Skip to content

Deprecated

Haroen Viaene edited this page Oct 11, 2017 · 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.addUserKeyWithValidity()

You can now use:

client.addUserKey(acls, {
  validity: value,
  maxQueriesPerIPPerHour: value,
  maxHitsPerQuery: value,
  indexes: value
}, 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.addUserKey(acls, {
  validity: value,
  maxQueriesPerIPPerHour: value,
  maxHitsPerQuery: value
}, callback)

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.

index.waitTask()

You can use waitForCompletion() now, which has a slightly different syntax:

index.waitForCompletion(taskId, callback);

forwardToSlaves

forwardToSlaves options were renamed to forwardToReplicas.

Clone this wiki locally