Text Search: Part 2
Learn and practice commands to apply text search to a MongoDB collection.
Sorting text search result
MongoDB text search computes a score
which can be used to sort text search results. We need to use projection to return text score
and sort the documents.
Here’s an example to sort documents based on the text score
.
Get hands-on with 1400+ tech skills courses.