Three ES|QL queries calculate click-through rate, mean reciprocal rank and click position distribution from your search click data, so you can pinpoint which queries need relevance tuning and where ranking improvements will have the most impact. Search volume and latency tell you that search is working, not that it's useful.

About 15 lines of OpenTelemetry (OTel) instrumentation lets you track clicks on search results and then query click-through rate (CTR), Mean Reciprocal Rank (MRR), and click position distribution with Elasticsearch Query Language (ES|QL) against the same traces index that your search spans already live in. You'll wire click tracking to your existing search. query_id and write the queries that show which searches need relevance tuning. Add client-side click tracking that links clicks back to their originating search via search. Calculate CTR; that is, the percentage of searches that produce at least one click.

Calculate MRR; that is, how far down the results users click on average. Analyze click position distribution to see the full shape of user engagement. Write ES|QL queries for all three metrics against traces-generic. A working OTel instrumentation setup from Blog 2 (search spans with search. * attributes flowing to Elastic via OTel-native ingestion). A front end that can send click events (JavaScript example provided). Familiarity with the attributes. * field mapping from Blog 2. In the second blog of the series, we instrumented search requests and ran six ES|QL queries against the data.

We can see what users search for, which queries return nothing, and how fast search is. But there's a blind spot. A search that returns 15 results looks healthy from the server side. Every metric we have says it worked. But if nobody clicks any of those results, your ranking has a problem, and none of the queries from Blog 2 will tell you. This is the gap between results returned and results that are useful . Search volume, zero-results rate, and latency measure the mechanics of search, but they don't measure whether search is actually helping users find what they need.