POST /eventory/data/search accepts a filterExpression string that narrows the
results before they are ranked. The expression is passed verbatim to the search
backend, so this page is the reference for what it accepts.
Syntax
Each clause is anattribute:value pair. Quote values that contain spaces. Combine
clauses with AND, OR and NOT, and group with parentheses. Numeric attributes
also accept comparison operators and a closed range.
Filterable attributes
Any field you see on a hit can generally be used as a filter attribute; the list above
is what is reliably supported today.
Limits and gotchas
- The whole expression is capped at 6000 characters. Longer requests fail with
400 INVALID_REQUESTbefore any backend call, and are not billed. - Unknown attributes are silently ignored, not rejected. A typo in an attribute
name produces an unfiltered result rather than an error, so test a new filter
against a query you know is non-empty and check that
nbHitsdrops. - Dates are Unix seconds. To filter on a calendar day, compute the timestamp range for that day in UTC.
Sorting and paging
sortBy orders the filtered results. recommended is the default relevance order;
every other value has an ascending form and a .desc form:
page is 1-based and hitsPerPage is capped at 100. nbHits and nbPages in the
response tell you how far you can page. Each page is one credit.
Example
query with a filter and a sort is the way to ask “what is selling fastest
in the UK right now”.