How to Run Multilingual Atlas Search Queries
This tutorial describes how to create an index that uses a
language analyzer and perform a
multilingual search against the sample_mflix.movies
collection. It
takes you through the following steps:
- Set up an Atlas Search index with dynamic mapping for the
sample_mflix.movies
collection. You can apply thelucene.italian
language analyzer or thelucene.italian
andlucene.english
language analyzer for indexing thefullplot
field. Atlas Search uses the defaultlucene.standard
analyzer for all the other fields that it dynamically indexes in the collection. - Run an Atlas Search compound query against the
fullplot
,released
, andgenres
fields in thesample_mflix.movies
collection.
Before you begin, ensure that your Atlas cluster meets the requirements described in the Prerequisites.
Create the Atlas Search Index
In this section, you will create an Atlas Search index on the fullplot
field in the sample_mflix.movies
collection.
Navigate to the Atlas Search page for your project.
- If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.
- If it is not already displayed, select your desired project from the Projects menu in the navigation bar.
- Click your cluster's name.
- Click the Search tab.
Enter the Index Name, and set the Database and Collection.
In the Index Name field, enter
default
.NoteIf you name your index
default
, you don't need to specify anindex
parameter when using the $search pipeline stage. Otherwise, you must specify the index name using theindex
parameter.- In the Database and Collection section, find the
sample_mflix
database, and select themovies
collection.
Search the Collection
➤ Use the Select your language drop-down menu to set the language of the example in this section.
You can use the compound operator to combine two or more
operators into a single query. In this section, connect to your Atlas
cluster and the run the sample query against the
sample_mflix.movies
collection using the compound
operator.