register() #
Registers a filter to this Koncorde instance.
This method is equivalent to executing Koncorde.normalize + Koncorde.store.
Arguments #
register(index: string, collection: string, filters: JSONObject): Promise<{ id: string, diff: JSONObject }>;| Arguments | Type | Description |
|---|---|---|
index | string | Index name |
collection | string | Collection name |
filters | JSONObject | Filters, in Koncorde format |
Return #
The register functions returns a promise, resolving to an object with the following attributes:
| Field | Type | Description |
|---|---|---|
id | string | The filter unique identifier |
diff | object | If the filter doesn't already exist in the engine, contains the normalized version of the provided filters |