Docs Menu
Docs Home
/
Atlas
/ / /

Operators and Collectors

The following table describes the operators that can be used inside of the $search and $searchMeta aggregation pipeline stages to customize the output of your Atlas Search query. Each operator supports queries over particular Atlas Search field types.

Operator
Description
Supported Atlas Search Types

Performs a search-as-you-type query from an incomplete input string.

Combines other operators into a single query.

Field types supported by the operators used inside the compound operator.

Queries fields in embedded documents, which are documents that are elements of an array.

embeddedDocuments and field types supported by the operators used inside the embeddedDocument operator.

Checks whether the field contains the specified value, including null value.

Tests for the presence of a specified field, regardless of the field type.

Field type isn't used by the exists operator.

Queries for values with specified geo shapes.

Queries for points within specified geographic shapes.

Queries both single value and array of values.

(Deprecated) Performs semantic search using Hierarchical Navigable Small Worlds algorithm.

Queries for similar documents.

Queries for values near a specified number, date, or geo point.

Searches documents for terms in an order similar to the query.

Supports querying a combination of indexed fields and values.

Queries for values within a specific numeric, date, string, and objectId range.

Interprets the query field as a regular expression.

(Deprecated) Specifies relative positional requirements for query predicates within specified regions of a text field.

Performs textual analyzed search.

Supports special characters in the query string that can match any character.

The following table describes the collectors that can be used inside of the $search and $searchMeta aggregation pipeline stages to return a document representing the metadata results of your Atlas Search query. This results document is typically an aggregation over the matching Atlas Search query results. The table also shows the Atlas Search field types that the collector supports.

Operator
Description
Supported Field Types

Groups query results by values or ranges in specified, faceted fields and returns the count for each of those groups.

You can also watch the following videos to learn more about Atlas Search operators and collectors:

Back

Metadata: $searchMeta