Documentation Center

UGC comment filtering and pagination options

To paginate or filter a list of flat or threaded comments, use the SimpleCommentsFilter class in the Java Content Interaction Libraries (CIL) for UGC.

Filter methodDescriptionUse in flat comments?Use in threaded comments?
withTop Filters the number of root-level comments to return to the number specified. Do not use this filter to count comments.yesyes, but only applies to the root level
withSkip Skips the specified number of root-level comments. This filter is intended for pagination purposes. Do not use this filter to count comments.yesyes, but only applies to the root level
withDepthExpands the specified number of reply levels in threaded comments. A value less than zero causes all reply levels to be expanded.noyes
withStatuses Filters comments to only comments that have one of the specified statuses.yesyes
withMetaValuesFilters comments to only comments that have all of the specified metadata key-value pairs.yesyes
withStartCreationDateFilters root-level comments to only comments that were created on or after the specified date.yesyes, but only applies to the root level
withEndCreationDateFilters root-level comments to only comments that were created on or before the specified date.yesyes, but only applies to the root level
withStartModificationDateFilters root-level comments to only comments that were last modified on or after the specified date.yesyes, but only applies to the root level
withEndModificationDateFilters root-level comments to only comments that were last modified on or before the specified date.yesyes, but only applies to the root level
withStartModerationDate Filters root-level comments to only comments that were last moderated on or after the specified date.yesyes, but only applies to the root level
withEndModerationDate Filters root-level comments to only comments that were last moderated on or before the specified date.yesyes, but only applies to the root level
withUserIdFilters root-level comments to only comments created by the user with the specified ID.yesyes, but only applies to the root level