Built-in Query types¶
General Query type parameters¶
All built-in Query types take the following optional parameters:
limit
- maximum number of results to returnoffset
- offset for search hits, used for paginating the resultssort
- sort orderfilter
- additional query filters:content_type
- return only results of given content typesvisible_only
- return only visible results (defaulttrue
)siteaccess_aware
- return only results limited to the current SiteAccess root (defaulttrue
)
For example:
1 2 3 4 5 6 7 8 9 10 11 12 |
|
Sort order¶
To provide a sort order to the sort
parameter, use names of the Sort Clauses.
To find them, refer to Sort Clause and the relevant Sort Clause class
Children¶
The Children
Query type retrieves children of the given location.
It takes location
or content
as parameters.
1 2 3 4 5 6 |
|
Tip
For an example of using the Children
Query type, see List content.
Siblings¶
The Siblings
Query type retrieves locations that have the same parent as the provided content item or location.
It takes location
or content
as parameters.
1 2 3 4 5 6 |
|
Tip
For an example of using the Siblings
Query type, see Embed related content.
Ancestors¶
The Ancestors
Query type retrieves all ancestors (direct parents and their parents) of the provided location.
It takes location
or content
as parameters.
1 2 3 4 5 6 |
|
RelatedToContent¶
The RelatedToContent
Query type retrieves content that is a reverse relation to the provided content item.
Tip
Reverse relations mean that the Query type shows content items that are related to the provided content item.
For example, if a blog post contains a link to an article, you can use a RelatedToContent
query to find the blog post from the article.
To find all relations of a content item (in this example, all content that the blog post is related to), refer to Embed content.
It takes content
or field
as required parameters.
field
indicates the Relation or RelationList field that contains the relations.
1 2 3 4 5 6 7 |
|
GeoLocation¶
The GeoLocation
Query type retrieves content by distance of the location provided in a MapLocation field.
It takes the following parameters:
field
- MapLocation field identifierdistance
- distance to check forlatitude
andlongitude
- coordinates of the location to check distance to- (optional)
operator
- operator to check value against, by default<=
1 2 3 4 5 6 7 8 9 10 |
|
Catalog¶
The Catalog
Query type retrieves products belonging to a catalog.
It takes the following parameters:
identifier
- identifier of the catalog
1 2 3 4 5 6 |
|