Create an XATTRs Mapping

  • Capella Operational
  • how-to
    +
    Use the Capella UI to create a mapping for Extended Attributes (XATTRs) and search for them with the Search Service.

    You must add an XATTRs mapping to your Search index to use and search for XATTRs metadata in your documents.

    Prerequisites

    • Your cluster is running Couchbase Server version 7.6.2 or later.

    • 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 created an index. For more information, see Create a Basic Search Index in Advanced Mode.

    • You have created a type mapping for a collection. For more information about how to create a type mapping on an index, see Create a Type Mapping in Advanced Mode.

    • You have logged in to the Couchbase Capella UI.

    Procedure

    To add an XATTRs mapping to your Search index from 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 an XATTRs mapping.

    4. Click Advanced Mode.

    5. Under Type Mappings, next to an existing type mapping, go to More Options (⋮)  Insert _$xattrs Mapping.

    6. (Optional) To set a different analyzer for the XATTRs mapping, in the Analyzer list, select an analyzer.

      You can select a default analyzer or create your own.

    7. (Optional) To only index the fields you add to the XATTRs mapping, select Index only specified fields.

      Otherwise, your XATTRs mapping is a dynamic mapping that includes all child fields from your documents' metadata.

    8. Click Submit.

    9. Click Update Index.

    Next Steps

    After you create a XATTRs mapping, you can choose to add or remove fields in your document metadata from your Search index.

    XATTRs mappings, child mappings, and type mappings use child fields to add and remove fields from a Search index.

    For more information about how to add or remove fields from a mapping, see Create a Child Field in Advanced Mode.

    To continue customizing your Search index, you can also:

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