POSTmethod and receive the criteria as a JSON object. Generally, we refer to this object as the search criteria - as it takes the same arguments as a DAL criteria. Some endpoints expect more parameters than specified here - however, these differ from one endpoint to another, so we don't specify them here.
associationsparameter allows you to load additional data to the minimal data set of an entity without sending an extra request - similar to a SQL Join. The key of the parameter is the property name of the association in the entity. You can pass a nested criteria just for that association - e.g. to perform a sort to or apply filters within the association.
includesparameter allows you to restrict the returned fields.
total-count-modeparameter can be used to define whether the total for the total number of hits should be determined for the search query. This parameter supports the following values:
0 [default]- No total is determined
SQL_CALC_FOUND_ROWSin the background.
1- An exact total is determined.
2- It is determined whether there is a next page
page & limit
limitparameters can be used to control pagination. The
pageparameter is 1-indexed.
filterparameter allows you to filter the result and aggregations using a multitude of filters and parameters. The filter types are equivalent to the filters available for the DAL.
filterhowever, they don't apply to aggregations. This is great, when you want to work with aggregations to display facets for a filter navigation, but already filter results based on filters without making an additional request.
_scorefor each found entity. Any filter type can be used for the
scorehas to be defined for each query. The sum of the matching queries then results in the total
termparameter, the server performs a text search on all records based on their data model and weighting as defined in the entity definition using the
sortparameter allows to control the sorting of the result. Several sorts can be transferred at the same time.
fieldparameter defines which field is to be used for sorting.
orderparameter defines the sort direction.
aggregationsparameter, meta data can be determined for a search query. There are different types of aggregations which are listed in the reference documentation. A simple example is the determination of the average price from a product search query.
groupingparameter allows you to group the result over fields. It can be used to realise queries such as: