Navigation

Create a Full Text Search Index

Special Offer

Want to try out Full Text Search on a cluster of your own? Use credit activation code MONGODB4DOT2 for $200 of Atlas credit. For information on redeeming Atlas credit, see Atlas Billing.

Prerequisites

To create a Full Text Search index, you must have an Atlas cluster with:

  • M30 or larger size
  • MongoDB version 4.2 or higher
  • At least one collection

Procedure

1
2

Click the Collections button on your desired cluster

3

Select a namespace from the left-side panel

Select a database, then select a collection for your full text index.

4

Click the Full Text Search tab in the right-side panel

5

Click the Create a FTS Index button

6

Name the index

The index name defaults to default. You can leave the default name in place or choose one of your own.

Note

If you name your index default, you don’t need to specify an index parameter when using the $searchBeta pipeline stage. Otherwise, you must specify the index name using the index parameter.

Index names must be unique within their namespace.

Screenshot of Create a FTS Index modal window
7

Define field mappings

By default, the new index uses dynamic field mappings, which allows Full Text Search to dynamically assign data types to fields. You can leave the default index structure in place or define one of your own.

Note

Defining your own field mappings is recommended for advanced users only.

8

Click the Create Index button

9

Check the status

The newly created index appears on the Full Text Search tab. While the index is building, the Status field reads Build in Progress. When the index is finished building, the Status field reads Active.

Note

Larger collections take longer to index. You will receive an email notification when your index is finished building.

Node Status

The Full Text Search tab in the right-side panel of the Atlas UI displays information about Full Text Search indexes for the selected namespace. The Status column shows the current state of the index on all the nodes of the cluster.

Screenshot of FTS Index information panel

When the Status column reads Active, the index is ready to use. In other states, queries against the index may return incomplete results.

Status Description
Active The index is ready to use.
Build in Progress The index is building or re-building after an edit. If one node finishes building the index before the other cluster nodes, a message may appear that the nodes are in different states.
Delete in Progress Atlas is deleting the index from the cluster nodes.