Navigation

Operators

The $search aggregation pipeline stage has the following operators:

OperatorDescription
autocompletePerforms a search-as-you-type query from an incomplete input string.
compoundCombines other operators into a single query.
equalsWorks in conjunction with the boolean and objectId data types.
existsTests for the presence of a specified field.
geoShapeQueries for values with specified geo shapes.
geoWithinQueries for points within specified geographic shapes.
nearQueries for values near a specified number, date, or geo point.
phraseSearches documents for terms in an order similar to the query.
queryStringSupports querying a combination of indexed fields and values.
rangeQueries for values within a specific numeric or date range.
regexInterprets the query field as a regular expression.
spanSpecifies relative positional requirements for query predicates within specified regions of a text field.
textPerforms textual analyzed search.
wildcardSupports special characters in the query string that can match any character.
Give Feedback