Create a Basic Search Index with the Web Console
- how-to
You can create a Search index with the Couchbase Server Web Console.
Use the Quick Editor if you do not need full customization or advanced settings to quickly create a Search index and type mappings.
You must create a Search index before you can run a search with the Search Service.
You can also Import a Search Index Definition with the Web Console.
Prerequisites
-
You have the Search Service enabled on a node in your database. For more information about how to deploy a new node and Services on your database, see Manage Nodes and Clusters.
-
You have a bucket with scopes and collections in your database. For more information about how to create a bucket, see Create a Bucket.
-
Your user account has the Search Admin role for the bucket where you want to create the index.
-
You have logged in to the Couchbase Server Web Console.
Procedure
To create a Search index with the Couchbase Server Web Console:
-
Go to Search.
-
Click Add Index.
-
In the Index Name field, enter a name for the index.
Your index name must start with an alphabetic character (a-z or A-Z). It can only contain alphanumeric characters (a-z, A-Z, or 0-9), hyphens (-), or underscores (_).
For Couchbase Server version 7.6 and later, your index name must be unique inside your selected bucket and scope. You cannot have 2 indexes with the same name inside the same bucket and scope.
-
In the Bucket list, select the bucket where you want to create the index.
-
Expand Customize Index.
-
(Optional) To create the index on a scope other than
_default
, select Use non-default scope/collection(s).-
In the Scope list, select the scope where you want to create the index.
-
Under Mappings, clear # default | dynamic.
-
Click + Add Type Mapping.
-
In the Collection list, choose the collection where you want to create the index.
-
Click OK.
-
-
Click Create Index.
Next Steps
This basic index includes all documents from the bucket, scope, and collection you selected. You can run a search against this index, but it’s recommended that you customize your index to improve performance and reduce the index size.
For more information about how to customize an index, see Customize a Search Index with the Web Console.
For more information about how to run a search, see Run A Simple Search with the Web Console or Run a Simple Search with the REST API and curl/HTTP. You can run a search before Indexing progress reaches 100% and return partial results.