The application integrating the Scrivito SDK with an external data provider can use this parameter for filtering.
DataScope
.The application integrating the Scrivito SDK with an external data provider can use this parameter for filtering.
Returns
Object
– An object representing the filters of the IndexParam
. Its keys are the attribute names, and the values are objects representing filter specifications. If no parameters are specified, an empty object ({}
) is returned.
Filter specifications are objects with three keys:
operator
(String
) – Name of the operator. The supported operators are equals
, notEquals
, isGreaterThan
, isGreaterThanOrEquals
, isLessThan
and isLessThanOrEquals
.opCode
(String
) – An operator code derived from the operator
.value
(String
) – Attribute value.The opCode
is only present in filter specifications returned by IndexParams#filters
, but must not be included in the filter
params for DataScope#transform
.
Allows you to apply multiple filter operators to the same attribute:
operator
(String
) – Must be and
value
(Array
) – An Array of filter specificationsA short form of the operator. We recommend using this for communicating filter specifications to the backend service in order to keep the URLs short.
eq
– if operator
is equals
neq
– if operator
is notEquals
gt
– if operator
is isGreaterThan
gte
– if operator
is isGreaterThanOrEquals
lt
– if operator
is isLessThan
lte
– if operator
is isLessThanOrEquals