A newer version of this documentation is available.

View Latest

Performing Searches

Following appropriate preparations, Full Text Searches can be performed in a number of ways.

Preparing for Full Text Searches

Before attempting a Full Text Search, you must:

  • Ensure that Couchbase Server has the Search service appropriately enabled. Enablement for a given node must occur as part of that node’s configuration. See Create a Cluster for information.

  • Create an appropriate index. This can be accomplished by means of the Couchbase Web Console. For a simple example of index-creation, which allows you to get started quickly, see Searching from the UI. For a more detailed explanation of the available options, including index-creation by means of the Couchbase REST API, see Creating Indexes.

Note that during index-creation, in support of most query-types, you can select (or create) and use an analyzer. This is optional: if you do not specify an analyzer, a default analyzer is provided. Analyzers can be created by means of the Couchbase Web Console, during index-creation, as described in Creating Indexes. Their functionality and inner components are described in detail in Understanding Analyzers.

Performing Full Text Searches

Full Text Searches can be performed with:

Establishing Demonstration Indexes

The Java SDK code-example provided in java-sdk::full-text-searching-with-sdk.adoc contains multiple demonstration calls — each featuring a different query-combination — and makes use of three different index-definitions, related to the travel-sample bucket: for the code example to run successfully, the three indexes must be appropriately pre-established. The definitions are provided in Demonstration Indexes. Instructions on how to use the Couchbase REST API to establish the definitions are provided in the section Index-Creation with the REST API, on the page Creating Indexes.