Docs Menu
Docs Home
/
MongoDB Compass
/ /

Run Atlas Search Queries

On this page

  • Steps
  • Learn More

You can run Atlas Search $search and $searchMeta queries from MongoDB Compass if you created the Atlas Search index for data on the Atlas cluster. You can also run $vectorSearch queries from MongoDB Compass if you have an existing Atlas Vector search index on your data in Atlas.

1
  1. From the Indexes tab, click Search Indexes.

  2. Hover over the index you want to use in your query.

2
  1. Click the Aggregate button.

    MongoDB Compass switches to the Aggregations tab where you can run your query.

  2. Construct your query.

    By default, MongoDB Compass selects the $search stage for your query. You can select the $searchMeta stage to use in your query. If you are using a vectorSearch type index in your query, you can only use the $vectorSearch stage in your query.

    Note

    The Atlas Search $search and $searchMeta and the Atlas Vector Search $vectorSearch pipeline stages must be the first stage in your aggregation pipeline.

  3. Click Run to run your query.

Back

Export Query to Specific Language

Next

Managing Saved Queries and Aggregations

On this page