SDK
SDK Android v3.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

createIndex #

Create a new empty index, with no associated mapping.


createIndex([index], [options], callback) #

ArgumentsTypeDescription
indexstringOptional index to query. If no set, defaults to Kuzzle.defaultIndex
optionsJSON objectOptional parameters
callbackfunctionCallback handling the response

Options #

OptionTypeDescriptionDefault
queuablebooleanMake this request queuable or nottrue

Callback Response #

Returns an object with the index creation status.

Usage #

kuzzle.createIndex("myIndex", new ResponseListener<Boolean>() {
  @Override
  public void onSuccess(JSONObject result) {
    // result var contains the creation status of myIndex.
  }
  @Override
  public void onError(JSONObject error) {
    // Handle error
  }
}

Callback response:

{
  "acknowledged": true,
  "shards_acknowledged": true
}