A newer version of this documentation is available.

View Latest

Indexes

      +
      Couchbase Server indexes enhance the performance of query and search operations.

      Indexes are used by certain services, such as Query, Analytics, and Search, as targets for search-routines. Each index makes a predefined subset of data available for the search.

      The Query service relies on indexes provided by the Index service. The Search and Analytics services both provide their own indexes, internally.

      Indexes, when well-designed, provide significant enhancements to the performance of search-operations.

      Indexes

      The following forms of index are available:

      Primary

      Provided by the Index Service, this is based on the unique key of every item in a specified collection. Every primary index is maintained asynchronously. A primary index is intended to be used for simple queries, which have no filters or predicates. For information on primary indexes, see Using Indexes.

      Secondary

      Provided by the Index Service, this is based on an attribute within a document. The value associated with the attribute can be of any type: scalar, object, or array.

      A Secondary Index is frequently referred to as a Global Secondary Index, or GSI. This is the kind of index used most frequently in Couchbase Server, for queries performed with SQL++. For information on Global Secondary Indexes, see Using Indexes.

      Full Text

      Provided by the Search Service, this is a specially purposed index, which contains targets derived from the textual contents of documents within one or more specified keyspaces. Text-matches of different degrees of exactitude can be searched for. Both input and target text-values can be purged of irrelevant characters (such as punctuation marks or html tags). For information on how to create Full Text Indexes, see Creating Indexes.

      Analytics

      Provided by the Analytics Service, this is a materialized access path for the shadow data in an Analytics collection. Analytics indexes can be used to speed up Analytics selection queries and join queries. If changes in operational data result in corresponding modifications to shadow data, Analytics indexes are updated automatically. See the section on Using Indexes in Couchbase Analytics.

      View

      Supports Couchbase Views, with fields and information extracted from documents. Views are deprecated in Couchbase Server 7.0, and will be removed in a future release.