queryReviews( )


Creates a query to retrieve a list of reviews.

The queryReviews() method builds a query to retrieve a list of reviews and returns a ReviewsQueryBuilder object.

The returned object contains the query definition, which is typically used to run the query using the find() method.

You can refine the query by chaining ReviewsQueryBuilder methods onto the query.

ReviewsQueryBuilder methods enable you to sort, filter, and control the results that queryReviews() returns.

The queryReviews() method runs with the following defaults, which you can override:

  • ascending("_createdDate")
  • limit(100)

The methods that are chained to queryReviews() are applied in the order they're called. For example, if you apply descending("_createdDate") and then descending("content.rating"), the results are sorted first by the _createdDate, and then, if there are multiple results with the same _createdDate, the items are sorted by content.rating.

PROPERTYSUPPORTED FILTERS & SORTING
namespaceeq(),ne(),in()
entityIdeq(),ne(),in()
_ideq(),ne(),in()
content.ratingeq(),ne(),in(),lt(),le(),gt(),ge(),ascending(),descending()
_createdDateeq(),ne(),in(),lt(),le(),gt(),ge(),ascending(),descending()
author.contactIdeq(),ne(),in()
helpfulnesseq(),ne(),in(),lt(),le(),gt(),ge(),ascending(),descending()
moderation.moderationStatuseq(),ne(),in()
verifiedeq(),ne(),ascending(),descending()
origin.typeeq(),ne(),ascending(),descending()
relevanceScoreeq(),ne(),in(),lt(),le(),gt(),ge(),ascending(),descending()
Authentication

This method may require higher-level permissions than the caller has, based on their identity and roles and permissions. In these cases, you can ensure the method is called with the required level of authorization by using one of the following:

Permissions
Read reviews
Manage Reviews
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
optionsQueryReviewsOptions

Information about the reviews to retrieve.

Returns
Errors

This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?