-
Notifications
You must be signed in to change notification settings - Fork 224
Deprecated
⚠️ all these methods will be completely removed in v4
To issue multiple queries, use:
client.search([{ indexName: 'first index', query: 'something', params: { hitsPerPage: 200 } }, { indexName: 'first index', query: 'something', params: { hitsPerPage: 200 } }], callback);
To issue multiple queries, use:
client.search([{ indexName: 'first index', query: 'something', params: { hitsPerPage: 200 } }, { indexName: 'first index', query: 'something', params: { hitsPerPage: 200 } }], callback);
To issue multiple queries, use:
client.search([{ indexName: 'first index', query: 'something', params: { hitsPerPage: 200 } }, { indexName: 'first index', query: 'something', params: { hitsPerPage: 200 } }], callback);
client.addApiKey(['search']);
client.listApiKeys()
index.addApiKey(['search']);
index.listApiKeys()
You can now use:
index.addApiKey(acls, { validity: value, maxQueriesPerIPPerHour: value, maxHitsPerQuery: value })
This feature is replaced by index.deleteBy
. deleteBy
only accepts an object with searchParameters as its first argument. The method accepts certain searchParameters, not all of them, read the documentation to know more.
index.deleteBy({ filters: 'category:cars', }, callback);
This new method is implemented in an atomic way on our side, instead of browsing and deleting at the client-side before, so there might be differences possible in what exactly get deleted.
To delete all objects in an index, you can use clearIndex
, as before:
index.clearIndex(callback);
This feature is now part of the regular search method. So you can replace the usage by:
index.search({ similarQuery: 'whatever-query-you-need', }, callback);
forwardToSlaves
options were renamed to forwardToReplicas
.