Index Settings REST API
- reference
Overview
The Index Settings REST API is provided by the Index Service. This API enables you to retrieve or set Index Service settings.
Changes automatically propagate to all Index Service nodes, and will be remembered across node and cluster restarts.
Unless otherwise noted, you should only change the Index Service settings when advised to do so by Couchbase Support.
Version information
Version : 8.0
Host information
{scheme}://{host}:{port}
The URL scheme, host, and port are as follows.
Component | Description |
---|---|
scheme |
The URL scheme. Use Values: |
host |
The host name or IP address of a node running the Index Service. Example: |
port |
The Index Service REST port. Use Values: |
Examples on this page
In the HTTP request examples:
-
$HOST
is the host name or IP address of a node running the Index Service. -
$USER
is the user name of any authorized user — see Security. -
$PASSWORD
is the password to connect to Couchbase Server.
Resources
This section describes the operations available with this REST API.
Retrieve Index Settings
GET /settings
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success. Returns an object giving Index Service settings. |
|
404 |
Not found. The URL may be specified incorrectly. |
|
401 |
Unauthorized. Failure to authenticate. |
Example HTTP Request
The example below retrieves the current index settings.
curl -X GET http://$HOST:9102/settings \
-u $USER:$PASSWORD
Example HTTP Response
{
"indexer.settings.allow_large_keys": true,
"indexer.settings.bufferPoolBlockSize": 16384,
"indexer.settings.build.batch_size": 5,
"indexer.settings.compaction.abort_exceed_interval": false,
"indexer.settings.compaction.check_period": 30,
"indexer.settings.compaction.compaction_mode": "circular",
"indexer.settings.compaction.days_of_week": "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",
"indexer.settings.compaction.interval": "00:00,00:00",
"indexer.settings.compaction.min_frag": 30,
"indexer.settings.compaction.min_size": 524288000,
"indexer.settings.compaction.plasma.manual": false,
"indexer.settings.compaction.plasma.optional.decrement": 5,
"indexer.settings.compaction.plasma.optional.min_frag": 20,
"indexer.settings.compaction.plasma.optional.quota": 25,
"indexer.settings.corrupt_index_num_backups": 1,
"indexer.settings.cpuProfDir": "",
"indexer.settings.cpuProfile": false,
"indexer.settings.defer_build": false,
"indexer.settings.eTagPeriod": 240,
"indexer.settings.enable_corrupt_index_backup": false,
"indexer.settings.enable_page_bloom_filter": true,
"indexer.settings.enable_shard_affinity": false,
"indexer.settings.fast_flush_mode": true,
"indexer.settings.gc_percent": 100,
"indexer.settings.inmemory_snapshot.fdb.interval": 200,
"indexer.settings.inmemory_snapshot.interval": 200,
"indexer.settings.inmemory_snapshot.moi.interval": 10,
"indexer.settings.largeSnapshotThreshold": 200,
"indexer.settings.log_level": "info",
"indexer.settings.maxNumPartitions": 64,
"indexer.settings.maxVbQueueLength": 0,
"indexer.settings.max_array_seckey_size": 10240,
"indexer.settings.max_cpu_percent": 0,
"indexer.settings.max_seckey_size": 4608,
"indexer.settings.max_writer_lock_prob": 20,
"indexer.settings.memProfDir": "",
"indexer.settings.memProfile": false,
"indexer.settings.memory_quota": 536870912,
"indexer.settings.minVbQueueLength": 30,
"indexer.settings.moi.debug": false,
"indexer.settings.moi.persistence_threads": 4,
"indexer.settings.moi.recovery.max_rollbacks": 2,
"indexer.settings.moi.recovery_threads": 8,
"indexer.settings.num_replica": 0,
"indexer.settings.percentage_memory_quota": 0,
"indexer.settings.persisted_snapshot.fdb.interval": 5000,
"indexer.settings.persisted_snapshot.interval": 5000,
"indexer.settings.persisted_snapshot.moi.interval": 600000,
"indexer.settings.persisted_snapshot_init_build.fdb.interval": 5000,
"indexer.settings.persisted_snapshot_init_build.interval": 5000,
"indexer.settings.persisted_snapshot_init_build.moi.interval": 600000,
"indexer.settings.plasma.recovery.max_rollbacks": 2,
"indexer.settings.rebalance.blob_storage_bucket": "",
"indexer.settings.rebalance.blob_storage_prefix": "",
"indexer.settings.rebalance.blob_storage_region": "",
"indexer.settings.rebalance.blob_storage_scheme": "",
"indexer.settings.rebalance.redistribute_indexes": false,
"indexer.settings.recovery.max_rollbacks": 2,
"indexer.settings.scan_getseqnos_retries": 30,
"indexer.settings.scan_timeout": 120000,
"indexer.settings.send_buffer_size": 1024,
"indexer.settings.serverless.indexLimit": 201,
"indexer.settings.sliceBufSize": 1600,
"indexer.settings.smallSnapshotThreshold": 30,
"indexer.settings.snapshotListeners": 4,
"indexer.settings.snapshotRequestWorkers": 4,
"indexer.settings.statsLogDumpInterval": 60,
"indexer.settings.storage_mode": "plasma",
"indexer.settings.storage_mode.disable_upgrade": false,
"indexer.settings.thresholds.mem_high": 70,
"indexer.settings.thresholds.mem_low": 50,
"indexer.settings.thresholds.units_high": 60,
"indexer.settings.thresholds.units_low": 40,
"indexer.settings.units_quota": 10000,
"indexer.settings.wal_size": 4096,
"projector.settings.log_level": "info",
"queryport.client.settings.backfillLimit": 5120,
"queryport.client.settings.closeActiveConnections": true,
"queryport.client.settings.minPoolSizeWM": 1000,
"queryport.client.settings.poolOverflow": 30,
"queryport.client.settings.poolSize": 5000,
"queryport.client.settings.relConnBatchSize": 100
}
Update Index Settings
POST /settings
Parameters
Name | Description | Schema |
---|---|---|
Body |
An object specifying Index Service settings. You only need to specify the settings you want to change; settings which are not specified are left unchanged. |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success. Returns |
|
401 |
Unauthorized. Failure to authenticate. |
|
404 |
Not found. The URL may be specified incorrectly. |
Example HTTP Requests
This example specifies the default setting for deferred builds.
curl -X POST http://$HOST:9102/settings \
-u $USER:$PASSWORD \
-H 'content-type: application/json' \
-d '{"indexer.settings.defer_build": true}'
This example sets the indexer scan timeout.
curl -X POST http://$HOST:9102/settings \
-u $USER:$PASSWORD \
-H 'content-type: application/json' \
-d '{"indexer.settings.scan_timeout": 15000}'
This example modifies the index batch size for rebalance.
curl -X POST http://$HOST:9102/settings \
-u $USER:$PASSWORD \
-H 'content-type: application/json' \
-d '{ "indexer.rebalance.transferBatchSize": 7 }'
Definitions
This section describes the properties consumed and returned by this REST API.
Settings
Property | Schema | |
---|---|---|
indexer.rebalance.transferBatchSize |
Sets the batch size Couchbase Server uses when rebuilding index files during rebalance. This setting has no effect on file-based rebalance. Couchbase Server breaks the rebuilding of indexes during a rebalance into batches to limit the performance impact. This setting controls the maximum number of indexes that a rebalance rebuilds concurrently. You must have the Full Admin or the Cluster Admin role to set this value. For an overview of rebalance as it affects the Index Service, including an overview of smart batching, see Rebalance. Default: |
Integer (int32) |
indexer.settings.allow_large_keys |
Whether the size of index keys is unlimited.
In Couchbase Server 6.5 and later, the Index Service does not need to restart when you update this setting. Default: |
Boolean |
indexer.settings.bufferPoolBlockSize |
Buffer pool block size. Default: |
Integer (int32) |
indexer.settings.build.batch_size |
Build batch size. Default: |
Integer (int32) |
indexer.settings.compaction.abort_exceed_interval |
Whether to abort index compaction if it is still running after the end of the index compaction interval. Default: |
Boolean |
indexer.settings.compaction.check_period |
An interval, specifying how frequently the Index Service checks whether the compaction threshold has been reached (seconds). Default: |
Integer (int32) |
indexer.settings.compaction.compaction_mode |
The compaction mode for indexes. Values: |
String |
indexer.settings.compaction.days_of_week |
The days of the week on which circular compaction is to run, if specified. Individual values must be day-names, each specified with an initial capital, and otherwise lower-case. Multiple values must be separated by a single comma, with no spaces. Default: |
String |
indexer.settings.compaction.interval |
A string in the form
The default value means any time. Default: |
String |
indexer.settings.compaction.min_frag |
The minimum fragmentation threshold to trigger compaction (percentage). Default: |
Integer (int32) |
indexer.settings.compaction.min_size |
Compaction minimum file size. Default: |
Integer (int32) |
indexer.settings.compaction.plasma.manual |
For standard indexes using Plasma, whether compaction should be triggered manually. Default: |
Boolean |
indexer.settings.compaction.plasma.optional.decrement |
For standard indexes using Plasma, the optional decrement. Default: |
Integer (int32) |
indexer.settings.compaction.plasma.optional.min_frag |
For standard indexes using Plasma, the minimum fragmentation threshold to trigger compaction (percentage). Default: |
Integer (int32) |
indexer.settings.compaction.plasma.optional.quota |
For standard indexes using Plasma, the optional quota. Default: |
Integer (int32) |
indexer.settings.corrupt_index_num_backups |
Corrupt index number of backups. Default: |
Integer (int32) |
indexer.settings.cpuProfDir |
The name of the directory where local CPU usage profiling information is captured. |
String |
indexer.settings.cpuProfile |
Whether the Index Service should capture local CPU usage profiling information. Default: |
Boolean |
indexer.settings.defer_build |
The default setting for the
You can override this setting by specifying the Default: |
Boolean |
indexer.settings.eTagPeriod |
The ETag (entity tag) period. Default: |
Integer (int32) |
indexer.settings.enable_corrupt_index_backup |
Whether corrupt index backup is enabled. Default: |
Boolean |
indexer.settings.enable_page_bloom_filter |
Whether Bloom filters are enabled for memory management. For details, see Per Page Bloom Filters. Default: |
Boolean |
indexer.settings.enable_shard_affinity |
Selects the index rebalance method. See Index Rebalance Methods.
If set to true, when you create an index, you can use the Default: |
Boolean |
indexer.settings.fast_flush_mode |
Whether fast flush mode is enabled. Default: |
Boolean |
indexer.settings.gc_percent |
Garbage collection percentage. Default: |
Integer (int32) |
indexer.settings.inmemory_snapshot.fdb.interval |
For standard indexes using ForestDB, the in-memory snapshotting interval (ms). This determines the earliest possibility of a scan seeing a given KV mutation. Default: |
Integer (int32) |
indexer.settings.inmemory_snapshot.interval |
The in-memory snapshotting interval (ms). This determines the earliest possibility of a scan seeing a given KV mutation. Default: |
Integer (int32) |
indexer.settings.inmemory_snapshot.moi.interval |
For memory-optimized indexes, the in-memory snapshotting interval (ms). This determines the earliest possibility of a scan seeing a given KV mutation. Default: |
Integer (int32) |
indexer.settings.largeSnapshotThreshold |
The large snapshot threshold. Default: |
Integer (int32) |
indexer.settings.log_level |
Indexer logging level. Values: |
String |
indexer.settings.maxNumPartitions |
Maximum number of partitions. Default: |
Integer (int32) |
indexer.settings.maxVbQueueLength |
Maximum vBucket queue length. Default: |
Integer (int32) |
indexer.settings.max_array_seckey_size |
If In Couchbase Server 6.5 and later, the Index Service does not need to restart when you update this setting. Default: |
Integer (int32) |
indexer.settings.max_cpu_percent |
The CPU capacity that the Index Service should use (percentage).
If set to Default: |
Integer (int32) |
indexer.settings.max_seckey_size |
If In Couchbase Server 6.5 and later, the Index Service does not need to restart when you update this setting. Default: |
Integer (int32) |
indexer.settings.max_writer_lock_prob |
Maximum writer lock prob. Default: |
Integer (int32) |
indexer.settings.memProfDir |
The name of the directory where local memory usage profiling information is captured. |
String |
indexer.settings.memProfile |
Whether the Index Service should capture local memory usage profiling information. Default: |
Boolean |
indexer.settings.memory_quota |
How much RAM is allocated to the Index Service for the current node. Default: |
Integer (int32) |
indexer.settings.minVbQueueLength |
Minimum vBucket queue length. Default: |
Integer (int32) |
indexer.settings.moi.debug |
Debug memory-optimized index storage. Default: |
Boolean |
indexer.settings.moi.persistence_threads |
For memory-optimized index storage, the number of persistence threads. Default: |
Integer (int32) |
indexer.settings.moi.recovery.max_rollbacks |
For memory-optimized index storage, the maximum number of committed rollback points. Default: |
Integer (int32) |
indexer.settings.moi.recovery_threads |
For memory-optimized index storage, the number of recovery threads. Default: |
Integer (int32) |
indexer.settings.num_replica |
The default number of index replicas to be created by the Index Service whenever Default: |
Integer (int32) |
indexer.settings.percentage_memory_quota |
Percentage memory quota. Default: |
Integer (int32) |
indexer.settings.persisted_snapshot.fdb.interval |
For standard indexes using ForestDB, the persisted snapshotting interval (ms). This must be a multiple of the in-memory snapshot interval. Default: |
Integer (int32) |
indexer.settings.persisted_snapshot.interval |
The persisted snapshotting interval (ms). This must be a multiple of the in-memory snapshot interval. Default: |
Integer (int32) |
indexer.settings.persisted_snapshot.moi.interval |
For memory-optimized indexes, the persisted snapshotting interval (ms). This must be a multiple of the in-memory snapshot interval. Default: |
Integer (int32) |
indexer.settings.persisted_snapshot_init_build.fdb.interval |
For standard indexes using ForestDB, the persisted snapshotting interval for the initial build (ms). Default: |
Integer (int32) |
indexer.settings.persisted_snapshot_init_build.interval |
The persisted snapshotting interval for the initial build (ms). Default: |
Integer (int32) |
indexer.settings.persisted_snapshot_init_build.moi.interval |
For memory-optimized indexes, the persisted snapshotting interval for the initial build (ms). Default: |
Integer (int32) |
indexer.settings.plasma.recovery.max_rollbacks |
For standard indexes using Plasma, the maximum number of committed rollback points. Default: |
Integer (int32) |
indexer.settings.rebalance.blob_storage_bucket |
Rebalance blob storage bucket. Default: |
String |
indexer.settings.rebalance.blob_storage_prefix |
Rebalance blob storage prefix. Default: |
String |
indexer.settings.rebalance.blob_storage_region |
Rebalance blob storage region. Default: |
String |
indexer.settings.rebalance.blob_storage_scheme |
Rebalance blob storage scheme. Default: |
String |
indexer.settings.rebalance.redistribute_indexes |
Whether to redistribute indexes on rebalance.
For details, see Rebalance. Default: |
Boolean |
indexer.settings.recovery.max_rollbacks |
The maximum number of committed rollback points. Default: |
Integer (int32) |
indexer.settings.scan_getseqnos_retries |
Scan get sequence numbers retries. Default: |
Integer (int32) |
indexer.settings.scan_timeout |
The default timeout for the indexer, in milliseconds. This is distinct from the Query Service timeout. The Index Service has its own timeout because index scans consume resources such as memory and CPU while holding snapshots and performing range scan. An index scan may time out if the Index Service timeout is lower than the Query Service timeout. Default: |
Integer (int32) |
indexer.settings.send_buffer_size |
Send buffer size. Default: |
Integer (int32) |
indexer.settings.serverless.indexLimit |
Serverless index limit. Default: |
Integer (int32) |
indexer.settings.sliceBufSize |
Slice buffer size. Default: |
Integer (int32) |
indexer.settings.smallSnapshotThreshold |
Small snapshot threshold. Default: |
Integer (int32) |
indexer.settings.snapshotListeners |
Snapshot listeners. Default: |
Integer (int32) |
indexer.settings.snapshotRequestWorkers |
Snapshot request workers. Default: |
Integer (int32) |
indexer.settings.statsLogDumpInterval |
Statistics log dump interval. Default: |
Integer (int32) |
indexer.settings.storage_mode |
The storage mode to be used for the Index Service on this node. |
|
indexer.settings.storage_mode.disable_upgrade |
Whether upgrade of the index storage mode is disabled. Default: |
Boolean |
indexer.settings.thresholds.mem_high |
High memory threshold. Default: |
Integer (int32) |
indexer.settings.thresholds.mem_low |
Low memory threshold. Default: |
Integer (int32) |
indexer.settings.thresholds.units_high |
High units threshold. Default: |
Integer (int32) |
indexer.settings.thresholds.units_low |
Low units threshold. Default: |
Integer (int32) |
indexer.settings.units_quota |
Units quota. Default: |
Integer (int32) |
indexer.settings.wal_size |
Write-ahead log size. Default: |
Integer (int32) |
projector.settings.log_level |
Projector logging level. Default: |
String |
queryport.client.settings.backfillLimit |
The maximum size of the backfill file (MB).
The maximum size is limited only by the available disk space. Default: |
Integer (int32) |
queryport.client.settings.closeActiveConnections |
Whether to close active connections. Default: |
Boolean |
queryport.client.settings.minPoolSizeWM |
Minimum pool size. Default: |
Integer (int32) |
queryport.client.settings.poolOverflow |
Maximum number of connections in a pool. Default: |
Integer (int32) |
queryport.client.settings.poolSize |
Number of simultaneous active connections in a pool. Default: |
Integer (int32) |
queryport.client.settings.relConnBatchSize |
Connection batch size. Default: |
Integer (int32) |
Storage Mode
One of … | Schema | |
---|---|---|
If you are using Enterprise Edition, the possible values are:
This setting can only be changed while there are no index nodes in the cluster. To change from standard GSI to memory optimized GSI or vice versa, you need to remove all the Index Service nodes in the cluster. |
String |
|
or |
String |
Security
The Index Settings API supports admin credentials. Pass your credentials through HTTP headers (HTTP basic authentication).
Default
Users must have the Full Admin or Cluster Admin role, with Cluster Read and Bucket INDEX List privileges.
Type : http
Refer to Roles for more details.