A newer version of this documentation is available.

View Latest

Modify Index Batch Size

      +
      The REST API supports modification of the batch size whereby the relocation and rebuilding of indexes, during rebalance, is maintained at a high level of performance.

      HTTP Method and URI

      POST /settings

      Description

      Establishes the batch size, which is used for index rebuilding and metadata transfer, during rebalance. This is the maximum number of indexes that will be moved concurrently in the cluster. Either the Full Admin or the Cluster Admin role is required.

      Curl Syntax

      curl -X POST http://<node-ip-address-or-domain-name>:<port-number>/settings
        -u <username>:<password>
        -d '{"indexer.rebalance.transferBatchSize":<integer>}'

      The port number must be either 9102 or 19102, which are those of the indexer_http_port and indexer_https_port respectively. The integer should be a small integer that corresponds to the batch size to be established. The default is 3.

      The change automatically propagates to all Index-Service nodes, and will be remembered across node and cluster restarts.

      Responses

      Success returns 200 OK. Failure to authenticate returns 401 Unauthorized. An incorrectly specified URI returns 404 Object Not Found.

      Failure correctly to specify the key "indexer.rebalance.transferBatchSize" generates no error, and returns 200 OK.

      Example

      The following call establishes the batch size as 7:

      curl -v -X POST http://localhost:9102/settings -u Administrator:password \
      -d '{"indexer.rebalance.transferBatchSize":7}'

      If successful, the call returns 200 OK and no object.

      See Also

      An overview of rebalance as it affects the Index Service, including an overview of smart batching, is provided in Index Service. For information on Couchbase-Server ports, see Couchbase Server Ports.