skip to content
Alvin Lucillo

Simple text query

/ 1 min read

A MongoDB text query searches the contents of the fields that are part of text index. This means a text index must exist for the query to work. Sample search looks like:

{ "$text": { "$search": "test" } }