Skip to content

Deprecated

Haroen Viaene edited this page Apr 16, 2018 · 18 revisions

⚠️ all these methods will be completely removed in v4

client.startQueriesBatch()

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.addQueryInBatch()

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.sendQueriesBatch()

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.addUserKey()

client.addApiKey(['search']);

client.listUserKeys()

client.listApiKeys()

index.addUserKey()

index.addApiKey(['search']);

index.listUserKeys()

index.listApiKeys()

index.addUserKeyWithValidity()

You can now use:

index.addApiKey(acls, {
  validity: value,
  maxQueriesPerIPPerHour: value,
  maxHitsPerQuery: value
})

index.deleteByQuery()

This feature is replaced by index.deleteBy. deleteBy only accepts an object with searchParameters as its first argument.

index.deleteBy({
  query: 'something',
}, 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);

similarSearch

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

forwardToSlaves options were renamed to forwardToReplicas.

Clone this wiki locally