Filtering and Paging
Query Filters
Querying can be done using a limited and simplified subset of the syntax described here.
Supported Logic Operators
- $not
- $or
- $and
Examples
filter={"system.modificationDate" : "1729685234"}
... SQL equivalent ...
where `modificationDate` = '1729685234'
filter=[{"system.creationDate" : "1557394706"}, {"system.modificationDate" : "1729685234"}]
...
where `creationDate` = '1557394706' AND `modificationDate` = '1557394706'
filter={"$and" : [{"system.subtype" : "Car"}, {"$or": [{"system.id": "14"}, {"system.key": "E-Type"}]}]}
...
where `subtype` = 'Car' AND (`id` = '14' OR `key` = 'E-Type')
filter={"$and" : [{"system.subtype": "Car"}, {"data.Manufacturer" : "Jaguar"}, {"$or": [{"system.id": "14"}, {"system.key": "E-Type"}]}]}
...
where `subtype` = 'Car' AND Manufacturer = 'Jaguar' AND (`id` = '14' OR `key` = 'E-Type')
filter={"o_type": {"$not": "folder"}}
...
where NOT `o_type` = 'folder'
Paging
The paging can be done via the page_cursor
parameter in the query. When loading the next page of a result, use the
value provided by the previous response for the page_cursor
parameter. The value is available in the link
header
or via the data attribute page_cursor
in the response content.
Technical Details
The page_cursor
has two operation modes:
- for pages below the configured max results window, it uses a numeric value and OpenSearch
from
query. - for pages after the max results window, it uses the
search_after
option of OpenSearch or Elasticsearch respectively.
The max results window can be configured via symfony configuration:
pimcore_data_hub_simple_rest:
# Limit of page size and offset when paging only works via page cursor (and not page numbers anymore).
max_results_window: 10000