Create a Type Mapping in Advanced Mode

  • Capella Operational
  • reference
    +
    Add a type mapping to your Search index using the Couchbase Capella UI’s Advanced Mode to control what documents are added to your index.

    For more information about type mappings, see Search Index Features.

    Prerequisites

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

    • You have started to create or already created a Search index in Advanced Mode.

    • You have logged in to the Couchbase Capella UI.

    Procedure

    To create a type mapping with the Capella UI:

    1. On the Operational Clusters page, select the cluster that has the Search index you want to edit.

    2. Go to Data Tools  Search.

    3. Click the index where you want to create a type mapping.

    4. Under Type Mappings, in the Bucket list, select the bucket where you want to create a type mapping.

    5. In the Scope list, select the scope where you want to create a type mapping.

    6. Click Add Mapping.

    7. In the Collection list, select the collection to use for the type mapping.

    8. (Optional) Do any of the following:

      1. To use a specific analyzer for documents added from this type mapping, in the Analyzer list, select an analyzer.

        By default, the mapping inherits the default analyzer you set for the Search index. For more information about analyzers, see Search Index Features.

      2. To switch from a dynamic type mapping to a static type mapping, select Only index specified fields.

      3. To only include documents of a specific type from a collection, in the Name field, add the document type to the end of the collection.

        For example, collection.document_type. For more information, see Set a Search Index Type Identifier.

    9. Click Submit.

    10. (Optional) To remove all documents that match the type mapping from your Search index, clear the checkbox for that type mapping.

      By leaving the checkbox selected, all matching documents will be included in the Search index.

    Next Steps

    After you create a static type mapping, you can Create a Child Field in Advanced Mode to add or remove specific document fields from your Search index.

    To add an extra filter to the documents selected by your type mapping, you can also Set a Search Index Type Identifier.

    If you have a document field that contains a JSON object, Create a Child Mapping in Advanced Mode for that field.

    To continue customizing your Search index, you can:

    To run a search and test the contents of your Search index, see Run A Simple Search with the Capella UI.