View Query Analytics
On this page
- Navigate to the Query Analytics Page
- In Atlas, go to the Clusters page for your project.
- Go to the Atlas Search page for your cluster.
- Click the name of the index.
- Click Query Analytics to view analytics for tracked queries run using this Atlas Search index.
- View Query Analytics for Tracked Search Terms
- Metrics for All Tracked $search Queries
- Metrics for Queries with no Results
- Factors That Affect Displayed Data
- Continue Learning
You can view metrics for the Atlas Search query terms tracked using the
tracking
option in the Atlas UI Query Analytics page
for the index that you used to query for the term. To learn how to tag
search terms in your queries, see Track Search Terms.
This page describes the metrics that Atlas captures for tracked queries and how to view the query analytics for an Atlas Search index in the Atlas UI.
Note
You must have an M10
or higher cluster running MongoDB v5.0 or
higher to view the analytics information for the tracked search terms
in the Atlas UI. Atlas Search doesn't track search terms or display
analytics for queries on free and shared-tier clusters.
Navigate to the Query Analytics Page
In Atlas, go to the Clusters page for your project.
If it's not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.
If it's not already displayed, select your desired project from the Projects menu in the navigation bar.
If the Clusters page is not already displayed, click Database in the sidebar.
The Clusters page displays.
Go to the Atlas Search page for your cluster.
You can go the Atlas Search page from the sidebar, the Data Explorer, or your cluster details page.
In the sidebar, click Atlas Search under the Services heading.
From the Select data source dropdown, select your cluster and click Go to Atlas Search.
The Atlas Search page displays.
Click the Browse Collections button for your cluster.
Expand the database and select the collection.
Click the Search Indexes tab for the collection.
The Atlas Search page displays.
Click the cluster's name.
Click the Atlas Search tab.
The Atlas Search page displays.
Click the name of the index.
The page displays an overview of this index, including Index Configurations and Field Mappings in the index definition. The left-hand side of the page also provides navigation options to the following pages:
Index Overview - View the configuration for this index
Search Tester - Search your collection using this index
Query Analytics - View analytics for your queries for tracked terms that used this index
Quick Start Tutorials - Access tutorials that can help you incorporate popular search features in your application
View Query Analytics for Tracked Search Terms
The Query Analytics page displays the following for a predefined date range such as the current day, last 7 days, last 30 days, or last 90 days, or a custom range (in UTC) that you specify, with a per day granularity:
Metrics for All Tracked $search Queries
This section shows the following metrics:
Approx # of Tracked $search Queries - approximate count of
$search
queries that included thetracking
option.Approx % of Top 10 Tracked Queries - percentage of
$search
queries with thetracking
option that are also the top 10 queries.
The section also shows a graph of the number of tracked queries for the selected date range.
You can expand Show Top Search Queries below the graph to view the following metrics:
Search Terms | Atlas Search query terms (one per row). |
Approx # | Approximate number of all tracked $search queries for
the term (in the same row). |
Approx % | Approximate percentage of all tracked For example, if you run a query for
|
View | Link to view the following metrics over a predefined or custom date range for the term (in the same row):
Click View factors affecting data to open a window that displays the days when there were no recorded queries for the search term and information about factors that affect the metrics that Atlas Search displays on the page. To learn more, see Factors That Affect Displayed Data. You can click Close to dismiss the window. To learn more, see how Atlas captures search terms. The Aggregation pipeline Query section displays the following:
Click < Query Analytics to return the Query Analytics page. |
Metrics for Queries with no Results
This section shows the following metrics for queries for which Atlas didn't return any results for the whole aggregation pipeline:
Approx # of Search Queries With No Results - approximate count of
$search
queries with thetracking
option for which Atlas Search didn't return results.Approx % of Search Queries With No Results - approximate percentage of
$search
queries with thetracking
option for which Atlas Search didn't return any results.
For the selected date range, the section also shows a graph of the number of tracked queries for which Atlas Search didn't return any results.
You can expand Show Top No Results Queries below the graph to view the following metrics:
Search Terms | Atlas Search query terms (one per row). |
Approx # of Searches | Approximate number of queries for the term (in the same row). |
Approx % of all Tracked Searches | Approximate percentage of tracked queries for the term (in the same row). This is the percentage of queries with the query term, out of the total number of queries, only on days when Atlas captured the query during the selected date range. For example, if you run a query for
|
View | Link to view the following metrics over a predefined or custom date range for the term (in the same row):
Click View factors affecting data to open a window that displays the days when there were no recorded queries for the search term and information about factors that affect the metrics that Atlas Search displays on the page. To learn more, see Factors That Affect Displayed Data. You can click Close to dismiss the window. To learn more, see how Atlas captures search terms. The Aggregation pipeline Query section displays the following:
Click < Query Analytics to return the Query Analytics page. |
Factors That Affect Displayed Data
Many factors affect the metrics that are displayed on the page.
Atlas Search query metrics is based on sampling, which can affect the accuracy of all the displayed metrics.
In addition, Atlas has a limit on the number of unique search terms
that Atlas captures each day from tracked $search
queries. Once Atlas reaches the limit, it doesn't capture new,
unique search terms. The following might be affected if Atlas
reaches the limit:
The approximate percentage of top 10 tracked queries
The order in which Atlas displays the top search terms
Individual tracked search term metrics might be affected if Atlas stopped capturing before queries for a search term ran. On those days, Atlas doesn't display the number of searches for that search term, resulting in a gap.
To learn more, see Behavior.
Continue Learning
Follow along with this video to learn how you can use query analytics to retrieve metrics on the top 10 query terms and query terms for which Atlas Search didn't return any results. Also learn how you can use synonyms to improve the search for terms for which Atlas Search didn't return any results.
Duration: 7 Minutes