Docs Home

Query Logs

5 min read
Last updated on August 17, 2026

Query Logs show you the actual search terms your end users are typing into your application ranked by volume, with performance data for each query. It's the first place to look when you want to understand how your search is performing and where to improve it.

While you may store this data, it may not be easy for you to access otherwise. The Bonsai Query Logs feature surfaces this data directly in your Bonsai dashboard, without any additional instrumentation required.


Where to find it

Your query log results exist in two places:

On your cluster dashboard — a preview of your top queries from the last 7 days appears as a widget on the cluster overview page.

Click the "Queries" tab menu item, or the "View All" link in the panel to open the full report.

In a weekly summary e-mail — each week, Bonsai sends a summary across all of your clusters. For each cluster, you'll see top queries by volume, zero-hit queries, and total request volume compared to the prior week. Clusters with no query data in the period will show "No data.”


Reading the Queries table

The Queries page shows one row per unique query, sorted by volume (descending) by default. In the full report view on the Queries tab, you can filter by 1 day, 7 days, 14 days, or 30 days at the top of the page.

ColumnWhat it means
QueryThe search term your user typed, extracted and normalized* from the raw request
VolumeHow many times this query was run in the selected time window
DurationAverage response time for this query, in milliseconds
HitsAverage number of results returned per search for this query

*Bonsai normalizes queries before grouping them. Normalization means that Shoes, shoes, and SHOES are counted as the same query. Whitespace differences are also merged. You cannot edit normalization rules. Bonsai applies a single consistent extractor across all clusters.


How to use your query data

  • High volume + low hits is the clearest signal of a relevancy problem. Users are searching for something frequently and not finding it. Start here.
  • Zero-hit queries are your highest-priority fix target. Users searched and came up completely empty — common causes are missing synonyms, content gaps, or language mismatches. For multilingual gaps, consider vector search.
  • High volume + high hits doesn't guarantee search is working — it means results are being returned, not that they're useful. Click-through data is not available in this release.
  • Short duration (under ~50ms) generally indicates a fast, well-structured query. Consistently above 500ms is worth investigating: look at your Request Duration Profiles in your Cluster Metrics Dashboard to see how the query is performing compared to your p50, p95, and p99 profiles. Note that we aggregate all traffic (searches, which comprise your queries, and writes) in these profiles.
  • Queries you don't recognize are normal. Your cluster may be receiving programmatic queries alongside user-typed searches. Queries with no extractable user text don't appear in the table, for example: any query with size: 0, filters without text values, or reports that aggregate.

For a deeper walkthrough on improving relevance with query data, see Announcing Query Logs on the Bonsai blog.


Export your data

In the full view, the Export button downloads a CSV of all queries in the selected time window, sorted by volume. Large exports are delivered as a download link.


Explicitly declaring the user query

While we've done our best to detect the user query from an OpenSearch or Elasticsearch QueryDSL, it may not be exactly what you want. For example if you're using vector search, the user query might have been replaced by a vector!

So, we've added a special feature that allows you to specify exactly what gets aggregated in query logs. Just set the value to ext.bonsai.user_query in your QueryDSL:

{
   "ext":{
     "bonsai":{
       "user_query":"YOUR VALUE HERE"
     }
   },
   "query":{...}
}

When the above is used, the user_query value will be taken instead of looking in the query body.


FAQ

Why don't I see Query Logs in my dashboard? A few possible causes: your cluster may be on an unsupported version, the feature may have been explicitly disabled via a cluster attribute, or your application may not be sending queries with an extractable user query term. The most common fix is to instrument your application to send the ext.bonsai user query field — see [link to doc] for how to do that.

Why does my cluster show "No data"? Either no queries with extractable user text ran in the selected time window, or your application isn't sending the ext.bonsai user query field. Adding that field is the fastest way to get meaningful data into Query Logs. If you've done that and still see nothing, contact support.

Can I see who ran a specific query? No. Query Logs shows aggregate data only — no user-agent breakdowns, IP addresses, or per-user detail. Individual query drill-down is not available in this release.

Can I edit how my queries are normalized? No. Normalization rules are applied consistently by Bonsai and are not configurable per cluster in this release.

Is there a cost to use Query Logs? No. Query Logs is included at no additional charge.

What's coming next? Query Logs is the first step in Bonsai's search relevancy tools. Future releases will build on this data to help you identify patterns, understand what your users are trying to accomplish, and improve your search results — automatically.

Ready to power your search with AI?

Launch a fully managed Elasticsearch or OpenSearch cluster, with built-in vector search and AI capabilities.

Create an AI Ready Search Cluster
Calming Bonsai waves