Docs Menu

Edit an Atlas Search Index

Note

You can also manage Atlas Search indexes with the Atlas API.

You can change the index definition of an existing Atlas Search index. You cannot rename an index; if you need to change an index's name, you must create a new index and delete the old one.

You must have the:

1

Click Databases in the top-left corner of Atlas to navigate to the Database Deployments page for your project.

2
3
4
5
  • If you are using the Visual Editor, configure the following settings:

    Field Name
    Description
    Necessity
    Index Analyzer

    Specify the analyzer to use for indexing the collection data. By default, Atlas Search uses the standard analyzer ("lucene.standard").

    Corresponds to the analyzer setting.

    Optional
    Search Analyzer

    Specify the analyzer to use when parsing data for the Atlas Search queries. By default, Atlas Search uses the standard analyzer ("lucene.standard").

    Corresponds to the searchAnalyzer setting.

    Optional
    Dynamic Mapping

    Specify dynamic or static mapping of fields. To disable dynamic mapping, set "dynamic": to Off. By default, dynamic mapping is enabled. If you disable dynamic mapping, you must specify the fields to index. To learn more about dynamic and static mappings, see Define Atlas Search Indexes.

    Corresponds to the mappings.dynamic setting.

    Required
    Field Mappings

    Required if dynamic mapping is disabled.

    To add the fields to index, you must specify the following settings for each field:

    • Field name - Name of the field to index.
    • Enable Dynamic Mapping - Static or dynamic mapping to use. If you disable dynamic mapping, the data in the field isn't automatically indexed.
    • Data Type Configuration - Field data type. To learn more about the supported data types and their options, see BSON Data Types and Atlas Search Field Types.
    Note

    Unlike compound indexes, the order of fields in the Atlas Search index definition is not important. Fields can be defined in any order.

    Corresponds to the mappings.fields setting.

    Conditional
  • If you are using the JSON Editor, configure the following settings:

    Field Name
    Description
    Necessity
    analyzer

    Specify the analyzer to use for indexing the collection data. By default, Atlas Search uses the standard analyzer ("lucene.standard").

    Optional
    searchAnalyzer

    Specify the analyzer to use when parsing data for the Atlas Search queries. By default, Atlas Search uses the standard analyzer ("lucene.standard").

    Optional
    mappings.dynamic

    Specify dynamic or static mapping of fields. To disable dynamic mapping, set "dynamic": to false. By default, dynamic mapping is enabled. If you disable dynamic mapping, you must specify the fields to index. To learn more about dynamic and static mappings, see Define Atlas Search Indexes.

    Required
    mappings.fields

    Required if dynamic mapping is disabled.

    To add the fields to index, you must specify the following settings for each field:

    • Field name - Name of the field to index.
    • Enable Dynamic Mapping - Static or dynamic mapping to use. If you disable dynamic mapping, the data in the field isn't automatically indexed.
    • Data Type Configuration - Field data type. To learn more about the supported data types and their options, see BSON Data Types and Atlas Search Field Types.
    Note

    Unlike compound indexes, the order of fields in the Atlas Search index definition is not important. Fields can be defined in any order.

    Conditional
6

The index's status changes from Active to Building. In this state, you can continue to use the old index because Atlas Search does not delete the old index until the updated index is ready for use. Once the status returns to Active, the modified index is ready to use.

Give Feedback
MongoDB logo
© 2021 MongoDB, Inc.

About

  • Careers
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2021 MongoDB, Inc.