couchbase
    Preparing search index...

    Class QueryIndexManager

    QueryIndexManager provides an interface for managing the query indexes on the cluster.

    Index

    Methods

    • Starts building any indexes which were previously created with deferred=true.

      Parameters

      • bucketName: string

        The name of the bucket to perform the build on.

      • Optionaloptions: BuildQueryIndexOptions

        Optional parameters for this operation.

      • Optionalcallback: NodeCallback<string[]>

        A node-style callback to be invoked after execution.

      Returns Promise<string[]>

    • Creates a new query index.

      Parameters

      • bucketName: string

        The name of the bucket this index is for.

      • indexName: string

        The name of the new index.

      • keys: string[]

        The keys which this index should cover.

      • Optionaloptions: CreateQueryIndexOptions

        Optional parameters for this operation.

      • Optionalcallback: NodeCallback<void>

        A node-style callback to be invoked after execution.

      Returns Promise<void>

    • Creates a new primary query index.

      Parameters

      • bucketName: string

        The name of the bucket this index is for.

      • Optionaloptions: CreatePrimaryQueryIndexOptions

        Optional parameters for this operation.

      • Optionalcallback: NodeCallback<void>

        A node-style callback to be invoked after execution.

      Returns Promise<void>

    • Drops an existing query index.

      Parameters

      • bucketName: string

        The name of the bucket containing the index to drop.

      • indexName: string

        The name of the index to drop.

      • Optionaloptions: DropQueryIndexOptions

        Optional parameters for this operation.

      • Optionalcallback: NodeCallback<void>

        A node-style callback to be invoked after execution.

      Returns Promise<void>

    • Drops an existing primary index.

      Parameters

      • bucketName: string

        The name of the bucket containing the primary index to drop.

      • Optionaloptions: DropPrimaryQueryIndexOptions

        Optional parameters for this operation.

      • Optionalcallback: NodeCallback<void>

        A node-style callback to be invoked after execution.

      Returns Promise<void>

    • Waits for a number of indexes to finish creation and be ready to use.

      Parameters

      • bucketName: string

        The name of the bucket to watch for indexes on.

      • indexNames: string[]

        The names of the indexes to watch.

      • timeout: number

        The maximum time to wait for the index, expressed in milliseconds.

      • Optionaloptions: WatchQueryIndexOptions

        Optional parameters for this operation.

      • Optionalcallback: NodeCallback<void>

        A node-style callback to be invoked after execution.

      Returns Promise<void>