Core
Framework v2.x
2

normalize() #

Normalizes filters without storing them.

The result can be directly used with the Koncorde.store function.

Arguments #

normalize(index: string, collection: string, filters: JSONObject): { collection: string, id: string, index: string, normalized: JSONObject[]};

ArgumentsTypeDescription
index
string
Index name
collection
string
Collection name
filters
JSONObject
Filters, in Koncorde format

Return #

The normalize function returns a promise resolving to an object with the following properties:

FieldTypeDescription
collection
string
Collection name
id
string
The filter unique identifier
index
string
Index name
normalized
JSONObject[]
Normalized/optimized version of the supplied filters