Create a Basic Search Index in Advanced Mode

  • how-to
    +
    Use Advanced Mode to create a Search index in the Couchbase Capella UI with full customization and advanced features.

    Use Quick Mode 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.

    Prerequisites

    • You have the Search Service enabled on a node in your database. For more information about how to change Services on your database, see Modify a Database.

    • You have a bucket with scopes and collections in your database. For more information, see Manage Buckets.

    • You have logged in to the Couchbase Capella UI.

    Procedure

    To use Advanced Mode in Couchbase Capella to create a Search index:

    1. On the Databases page, select the database where you want to create a Search index.

    2. Go to Data Tools  Search.

    3. Click Create Search Index.

    4. Click Advanced Mode.

    5. In the Index Name field, enter a name for the Search 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.

    6. Under Type Mappings, in the Bucket list, select the bucket where you want to create your Search index.

    7. In the Scope list, select the scope where you want to create your Search index.

    8. Click Add Mapping.

    9. In the Collection list, select a collection for the type mapping.

    10. (Optional) To switch from a dynamic to a static type mapping, click Index only specified fields.

    11. Click Submit.

    12. (Optional) Do any of the following:

      1. If you created a static type mapping, then you should add a child field or add a child mapping to your type mapping to specify the documents you want to include in your index.

      2. Add additional features to your Search index to improve performance and search results. For more information, see Search Index Features.

    13. Click Create Index.

    Next Steps

    If you did not create a static type mapping, this basic index includes all documents from the 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 the different features you can add to your Search index to improve performance and search results, see Search Index Features.

    For more information about how to run a search, see Run A Simple Search with the Capella UI.