API Docs for: 2.2.2
Show:

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

()

Methods

build

() StoreIndex

Construct a StoreIndex instance.

Returns:

withCallback

(
  • callback
)
chainable

Set the callback to be executed when the operation completes.

Parameters:

  • callback Function

    the callback to execute

    • err String

      An error message

    • response Boolean

      operation either succeeds or errors. This will be true.

withIndexName

(
  • indexName
)
chainable

The name of the index to store.

Parameters:

  • indexName String

    the name of the index

withNVal

(
  • nVal
)
chainable

Set the nVal.

Parameters:

  • nVal Number

    the number of replicas.

withSchemaName

(
  • schemaName
)
chainable

The name of the schema to use with this index. If not provided the default '_yz_default' will be used.

Parameters:

  • schemaName String

    the name of the schema to use.

withTimeout

(
  • timeout
)
chainable

Set a timeout for this operation.

Parameters:

  • timeout Number

    a timeout in milliseconds.