The $search Aggregation Pipeline Stage


Looking for $searchBeta? Use $search instead, the official aggregation stage for running search queries.

Atlas Search queries take the form of an aggregation pipeline stage. The $search stage performs a full-text search on the specified field or fields which must be covered by an Atlas Search index.

A $search pipeline stage has the following prototype form:

$search: {
<operator>: {
<specification(s)> } } }

$search must be the first stage of any pipeline it appears in. $search cannot be used in:

See also:
Give Feedback