StoreIndex.Builder Class
A builder for constructing StoreIndex instances.
Rather than having to manually construct the options and instantiating a StoreIndex directly, this builder may be used.
var store = StoreIndex.Builder()
.withIndexName('index_name')
.withSchemaName('my_schema')
.withCallback(callback)
.build();
Constructor
StoreIndex.Builder
()
Item Index
Methods
withCallback
(
chainable
-
callback
Set the callback to be executed when the operation completes.
Parameters:
-
callback
Functionthe callback to execute
-
err
StringAn error message
-
response
Booleanoperation either succeeds or errors. This will be true.
-
withIndexName
(
chainable
-
indexName
The name of the index to store.
Parameters:
-
indexName
Stringthe name of the index
withNVal
(
chainable
-
nVal
Set the nVal.
Parameters:
-
nVal
Numberthe number of replicas.
withSchemaName
(
chainable
-
schemaName
The name of the schema to use with this index. If not provided the default '_yz_default' will be used.
Parameters:
-
schemaName
Stringthe name of the schema to use.
withTimeout
(
chainable
-
timeout
Set a timeout for this operation.
Parameters:
-
timeout
Numbera timeout in milliseconds.