Video Transcript (English)
Congratulations on completing this unit. In this unit, you were introduced to Atlas Search and learned how it works. Now you’ll be able to seamlessly implement Atlas search in your own application to allow your users to perform text search on their data.
Let’s recap what we covered.
First, you learned about the Atlas Search Process, mongot, which uses Apache Lucene under the covers to manage search capabilities.
After that, you learned about dynamic and static mappings.
Dynamic mappings index every field that has supported data types in the specified collection. This can be useful for experimenting with Atlas Search or if unknown fields need to be indexed.
Don’t forget this flexibility comes at a cost.
Static mappings index specific fields instead of the entire document. By using static mappings, we can significantly reduce the size of our search indexes and improve performance.
Next, you learned that in order to create a search index, we must define a field's data type.
Atlas search supports many data types, such as: Strings, Numbers, Booleans, Arrays, objectId, Date, and documents.
For a complete list of supported data types, don’t forget to check out the MongoDB documentation.
You also learned that data type support can vary depending on whether we use dynamic or static mappings.
After creating a search index, we created a search query using the aggregation framework with the search stages.
You learned that the search stage accepts many search operators.
The first search operator we covered was the text operator, which performs a full text search.
After, you learned that the equals search operator returns documents with a field that matches the specified value.
Then, you learned that the near search operator allows us to perform a search for dates, numbers, or geographic locations nearest to a given value or point.
Finally, you learned that the range operator allows us to perform a search based on a range of numbers or dates.
Finally, we covered search facets with the searchMeta stage.
The searchMeta stage is used to return a summary of your results.
Facets allow us to group results by a category or range, and return the count for each of the specified groups. These groups are generally referred to as buckets.
You learned that to create a search facet, we need the target field to be either a stringFacet, dateFacet, or numberFacet in our search index.
Now that you know the basics of Atlas Search, you might want to check out the units on managing search indexes and analyzers.
You can also visit MongoDB’s documentation.
Until next time, keep learning!