Class QueryIndexManager

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

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.

    • Optional options: BuildQueryIndexOptions

      Optional parameters for this operation.

    • Optional callback: 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.

    • Optional options: CreateQueryIndexOptions

      Optional parameters for this operation.

    • Optional callback: 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.

    • Optional options: CreatePrimaryQueryIndexOptions

      Optional parameters for this operation.

    • Optional callback: 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.

    • Optional options: DropQueryIndexOptions

      Optional parameters for this operation.

    • Optional callback: 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.

    • Optional options: DropPrimaryQueryIndexOptions

      Optional parameters for this operation.

    • Optional callback: NodeCallback<void>

      A node-style callback to be invoked after execution.

    Returns Promise<void>

  • Returns a list of indexes for a specific bucket.

    Parameters

    • bucketName: string

      The name of the bucket to fetch indexes for.

    • Optional options: GetAllQueryIndexesOptions

      Optional parameters for this operation.

    • Optional callback: NodeCallback<QueryIndex[]>

      A node-style callback to be invoked after execution.

    Returns Promise<QueryIndex[]>

  • 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.

    • Optional options: WatchQueryIndexOptions

      Optional parameters for this operation.

    • Optional callback: NodeCallback<void>

      A node-style callback to be invoked after execution.

    Returns Promise<void>