Tutorials
On this page
The following tutorials take you through the steps of setting up and querying an Atlas Search index.
Prerequisites
Important
The How to Run Queries on Multiple Collections tutorial doesn't have the same prerequisites as the other Atlas Search tutorials. To learn more, see the Prerequisites section of the How to Run Queries on Multiple Collections tutorial.
To complete these tutorials, you must have the following:
- An Atlas cluster with MongoDB version 4.2 or higher.
- The sample datasets loaded into your Atlas cluster.
One of the following applications to run queries on your Atlas cluster:
About the Tutorials
- The How to Use Autocomplete with Atlas Search tutorial describes how to create and
query an Atlas Search index configured with an
autocomplete
field using theautocomplete
operator. We will create the Atlas Search index on thesample_mflix.movies
collection and indextitle
field text values for autocompletion. We will run Atlas Search queries using theautocomplete
operator to search the indexed field for a sequence of characters. - The How to Run Compound Queries with Weighted Fields tutorial describes
how to create a dynamic index and run compound queries with custom
scoring. The queries search the
sample_mflix.movies
collection and alter the relevance score of the documents in the result usingconstant
,boost
, andfunction
options. - The How to Run Atlas Search Queries with a Date Range Filter tutorial describes how
to create a dynamic index and run compound queries that use the
range
operator. The queries search thesample_mflix.movies
collection for movies between a specified date range. - The How to Run a Compound Geo JSON Query tutorial describes
how to create an index on the
sample_airbnb.listingsAndReviews
collection and run a query that returns documents with thename
,address
, andproperty_type
of each property within a specified polygon defined usingcoordinates
. Atlas Search results reflect a preference for properties of typecondominium
, and each document in the result is assigned a relevancescore
, returned in order from highest to lowest. - The How to Use Facets with Atlas Search tutorial describes how to create an index
with a facet definition for the
sample_mflix.movies
collection and run queries against the faceted fields for results grouped by values and ranges in the specified, faceted fields, including a count for each of those groups. - The How to Run Queries on Multiple Collections tutorial describes how to index and query on multiple collections using a combination of On-Demand Materialized Views and Atlas App Services Scheduled Triggers.
- The How to Run Partial Match Atlas Search Queries tutorial describes how to create an
index on the
sample_mflix.movies
collection and run case-sensitive partial match queries against the indexed field using autocomplete, phrase, regex, and wildcard operators. - The How to Use Synonyms with Atlas Search describes how to add a collection that
configures words as synonyms, create an index that defines synonym
mappings on the
sample_mflix.movies
collection, and run Atlas Search queries against thetitle
field using words that are configured as synonyms. - The How to Run Multilingual Atlas Search Queries describes how to create an index
that uses a language analyzer and perform a multilingual search
against the
sample_mflix.movies
collection. The queries search thesample_mflix.movies
collection for full movie plots that contain a multilingual term. - The How to Run Atlas Search String Queries Against Date and Numeric Fields describes how to run queries against numeric and date fields using operators that only support string queries. The queries search for properties that were listed on certain dates and allow stay of up to certain number of days.