Search Filter

Query language

Attribute filter

Query to search items based on a value of an attribute. Filter consists of 3 parts, separated by a dot:
Syntax: {attribute}.{comparer}.{value}.

  • Attribute: attribute to filter on, this attribute has to be in elastic.

  • Comparer: Currently supports: 'equal' (eq), 'in' for ranges and 'startswith' for strings. It is also possible to filter on greater or lower then (or equal) with the ranges comparer.

  • Value: value to filter on. Supports All and Any for multiple values.

It is possible to link multiple filters together with the separator '/'.

Free text filter

Filter also supports free text search. With this, it is possible to search inside predefined fields for certain words of pieces of words, depending on the used configuration.
Syntax: search(free text)

Prefilter

Similar to filter but not visually exposed to the user

Combining filters

It is possible to link multiple filters together with the separator '/', which behaves as a AND operator.

Examples

Attribute filter

Equal

"Filter": "id.eq.abc" 
"Filter": "id.eq.any(abc,xyz)"
"Filter": "options.eq.all(a,b)"

Within ranges

"Filter": "price.in(0-100)"
"Filter": "price.in(-25)"
"Filter": "price.in(25-)"
"Filter": "price.in.any(0-100,500-1000)"
"Filter": "price.in.all(0-100,500-1000)"

Starts with

"Filter": "name.startswith.abc"
"Filter": "name.startswith.any(abc,xyz)"
"Filter": "name.startswith.all(abc,xyz)"

Free text filter

"Filter": "search(fantastic)"
"Filter": "search(fanta)"

Prefilter

"Filter": "status.eq.RN"

Combining filters

"Filter": "name.startswith.abc/brand.eq.xyz/price.in.any(0-100,500-1000)"