Collection, Object, XATTRs, and Field Mapping Options

  • Capella Operational
  • reference
    +
    When you create a Search index in the Capella UI, you must set options for each collection, object, Extended Attributes (XATTRs) object, or field mapping you add to your index.

    You can create the following types of mappings in the Capella UI:

    Indexing an entire collection creates a dynamic type mapping for that collection. Indexing a field creates a static type mapping for the parent collection. For more information about static and dynamic type mappings, see Search Index Features.

    For more information about how to create a Search index, see Create a Search Index with the Capella UI.

    Collection Type Mapping Options

    Configure an entire collection type mapping to add or remove all documents in that collection from your Search index.

    You can add JSON object mappings, an Extended Attributes (XATTRs) mapping, or field type mappings for objects and fields inside your collection to change your collection type mapping from a dynamic mapping to a static mapping.

    You can configure the following options for a type mapping that uses an entire collection:

    Option Description

    Index everything from collection: “$COLLECTION_NAME”

    You must select Index everything from collection to add a collection type mapping.

    The Search Service adds all documents inside the selected collection to your Search index.

    In the previous version of the Search Service UI, this option was the same as leaving Only index specified fields unchecked in Advanced Mode.

    It was not available in Quick Mode.

    Use keyword analyzer for text

    To index any Text type fields inside this collection with the keyword analyzer, select Use keyword analyzer for text.

    To use other analyzers on text fields, clear Use keyword analyzer for text.

    For more information about analyzers, see Search Index Features.

    In the previous version of the Search Service UI, this option was named Index text fields as identifiers in Quick Mode.

    It was not available in Advanced Mode.

    Analyzer/Language

    If you do not select Use keyword analyzer for text, use the Analyzer/Language list to select an analyzer to use or the language of any content inside Text fields in the collection.

    For more information about the available language and analyzer options, see Default Analyzers.

    In the previous version of the Search Service UI, this option was named Analyzer/Language in Quick Mode.

    In Advanced Mode, it was named Default Analyzer.

    JSON Object Mapping Options

    Configure a JSON object mapping to add or remove a JSON object from your Search index. This JSON object does not currently have to exist in your document schema.

    You can add a field type mapping for any fields under a JSON object to change your JSON object mapping from a dynamic mapping to a static mapping.

    You can configure the following options for a JSON object mapping:

    Option Description

    Index everything under: “$OBJECT_NAME”

    Select Index everything under to create a dynamic object mapping in your Search index.

    The Search Service adds all document fields inside the object to your Search index.

    In the previous version of the Search Service UI, this option was not available.

    Use keyword analyzer for text

    To index any Text type fields inside this object with the keyword analyzer, select Use keyword analyzer for text.

    To use other analyzers on text fields, clear Use keyword analyzer for text.

    For more information about analyzers, see Search Index Features.

    In the previous version of the Search Service UI, this option was not available for object mappings.

    Analyzer/Language

    If you do not select Use keyword analyzer for text, use the Analyzer/Language list to select the analyzer or language for the content inside any Text fields.

    For more information about the available language and analyzer options, see Default Analyzers.

    In the previous version of the Search Service UI, this option was named Analyzer/Language in Quick Mode.

    In Advanced Mode, it was named Default Analyzer.

    XATTRs Mapping Options

    Configure an Extended Attributes (XATTRs) mapping to add or remove document metadata from your Search index. The XATTRs object does not have to currently exist in your document schema.

    You can add a field type mapping for any fields under an XATTRs mapping to change your mapping from a dynamic mapping to a static mapping.

    You can only configure 1 XATTRs mapping for each collection in your Search index.

    You can configure the following options for an XATTRs mapping:

    Option Description

    Index everything under: “$xattrs”

    Select Index everything under: "$xattrs" to create a dynamic XATTRs mapping in your Search index.

    The Search Service adds all metadata fields inside the XATTRs object to your Search index.

    In the previous version of the Search Service UI, this option was the same as leaving Only index specified fields unchecked in Advanced Mode.

    This option was not available in Quick Mode.

    Use keyword analyzer for text (Text Fields Only)

    To index this field with the keyword analyzer, select Use keyword analyzer for text.

    To use other analyzers on this text field, clear Use keyword analyzer for text.

    For more information about analyzers, see Search Index Features.

    In the previous version of the Search Service UI, this option was not available for XATTRs mappings.

    Field Type Mapping Options

    Configure a single field type mapping to add or remove that field from your Search index.

    You can configure the following options for a type mapping that uses a single field:

    Option Description

    Type

    Set the data type of the contents of the field.

    The Type you choose changes the options you have available for that field.

    For more information about the available field data types, see Field Data Types.

    In the previous version of the Search Service UI, this option had the same name.

    Searchable As

    Set a different name that you can use to search the field’s contents in a query.

    The default value is the field’s name.

    In the previous version of the Search Service UI, this option had the same name.

    Use keyword analyzer for text (Text Fields Only)

    To index this field with the keyword analyzer, select Use keyword analyzer for text.

    To use other analyzers on this text field, clear Use keyword analyzer for text.

    For more information about analyzers, see Search Index Features.

    In the previous version of the Search Service UI, this option was named Index this field as an identifier in Quick Mode.

    This option was not available in Advanced Mode.

    Analyzer/Language (Text Fields Only)

    If you do not select Use keyword analyzer for text, use the Analyzer/Language list to select the analyzer or language for the content inside any Text fields.

    For more information about the available language and analyzer options, see Default Analyzers.

    In the previous version of the Search Service UI, this option was named Analyzer/Language in Quick Mode.

    In Advanced Mode, it was named Default Analyzer.

    Dimension (Vector Fields Only)

    For a vector child field, enter the total number of elements in the vector embedding array.

    From Couchbase Server version 7.6.2 and later, Vector Search indexes can support arrays with up to 4096 elements. Arrays can be an array of arrays.

    For more information about Vector Search indexes, see Use Vector Search for AI Applications or Create a Vector Search Index in Quick Mode.

    In the previous version of the Search Service UI, this option had the same name.

    Similarity Metric (Vector Fields Only)

    For a vector child field, choose the method to calculate the similarity between the vector embedding in a Vector Search index and the vector embedding in a Vector Search query.

    It’s recommended to choose the same similarity metric for your Search index as the one used in your embedding model.
    • dot_product: Calculated by adding the result of multiplying a vector’s components, or the product of the magnitudes of the vectors and the cosine of the angle between them. The dot product of 2 vectors is affected by the length and direction of each of the vectors, rather than just taking a straight-line distance.

      Dot product similarity is commonly used by Large Language Models (LLMs). Use dot_product to get the best results with an embedding model that uses dot product similarity.

    • l2_norm: Also known as Euclidean distance. Uses the straight-line distance between 2 vectors to calculate similarity. Smaller euclidean distances mean that the values of each coordinate in the vectors are closer together.

      It’s best to use l2_norm similarity when your embeddings contain information about the count or measure of specific things, and your embedding model uses the same similarity metric.

    For more information about Vector Search indexes, see Use Vector Search for AI Applications or Create a Vector Search Index in Quick Mode.

    In the previous version of the Search Service UI, this option had the same name.

    Optimized For (Vector Fields Only)

    For a vector child field, choose whether the Search Service should prioritize recall or latency when returning similar vectors in search results:

    • recall: The Search Service prioritizes returning the most accurate result. This may increase resource usage for Search queries.

      The Search Service uses an nprobe value to calculate the number of centroids to search when using recall priority. This value is calculated by taking the square root of the number of centroids in the index.

    • latency: The Search Service prioritizes returning results with lower latency. This may reduce the accuracy of results.

      The Search Service uses half the nprobe value calculated for recall priority.

    For more information about Vector Search indexes, see Use Vector Search for AI Applications or Create a Vector Search Index in Quick Mode.

    In the previous version of the Search Service UI, this option had the same name.

    Include in search results

    To include content from the field in search results, select Include in search results.

    To exclude the field’s content from search results, clear Include in search results.

    In the previous version of the Search Service UI, this option was named Include in search results in Quick Mode.

    In Advanced mode, it was named Store.

    Support phrase matching

    To support searches for whole phrases, select Support phrase matching.

    To turn off phrase matching, clear Support phrase matching.

    To enable Support phrase matching, you must also enable Include in search results.

    In the previous version of the Search Service UI, this option was named Support phrase matching in Quick Mode.

    In Advanced Mode, it was named Include Term Vectors.

    Support field agnostic search

    To search the field’s contents without specifying the field name in a search query, select Support field agnostic search.

    To turn off field agnostic search, clear Support field agnostic search.

    In the previous version of the Search Service UI, this option was named Support field agnostic search in Quick Mode.

    In Advanced Mode, it was named Include in _all field.

    Support sorting and faceting

    To support sorting search results based on this field and use facets with the field’s contents, select Support sorting and faceting.

    To turn off sorting and facets, clear Support sorting and faceting.

    In the previous version of the Search Service UI, this option was named Support sorting and faceting in Quick Mode.

    In Advanced Mode, it was named Doc Values.