Change Intelligence is coming.

Couchbase dropQueryIndex

Last updated: July 13, 2026

Drops a primary or secondary N1QL query index from a Couchbase collection. Set isPrimary to true to drop the primary index, or false to drop a named secondary index.

Known limitations:

  • This operation is irreversible. There is no automatic rollback support.

  • Dropping the primary index causes queries without a matching secondary index to fail or fall back to a full collection scan.

Available attributes

Attribute

Type

Description

Required

isPrimary

Boolean

When true, drops the primary index. When false, drops the named secondary index specified by indexName.

Yes

bucketName

String

The name of the bucket containing the collection.

Yes

scopeName

String

The name of the scope containing the collection.

Yes

collectionName

String

The name of the collection whose index to drop.

Yes

indexName

String

The name of the secondary index to drop. Required when isPrimary is false. Omit when isPrimary is true.

No

loading

loading

loading