Using _score as a metric in visualizations #41587
Labels
enhancement
New value added to drive a business result
Feature:Lens
impact:needs-assessment
Product and/or Engineering needs to evaluate the impact of the change.
Team:Visualizations
Visualization editors, elastic-charts and infrastructure
Projects
Background to requirement
"Relevance engineer" is an emerging job title and Kibana has the potential to be a useful tool in helping tune relevance. Relevance engineers tweak various query DSL settings and want to review the effects of these changes.
Visualizations like the
histogram
can be very useful, showing the distribution of result scores produced by a query and the types of things they match :In this diagram we can see the strict, high-scoring clauses have produced matches that belong to a small cluster of product categories on the right. We can also see that the fuzzier, low-scoring clauses have produced an enormous number of matches from a huge variety of product departments on the left. Seeing this, the relevance engineer might turn-down the fuzzy dial on the query settings. Although the above diagram shows results of a query broken down by `_score` on the x-axis configuring this visualization involved a horrible hack.
What's wrong with analyzing scores in Kibana today?
_score
._score
BUT - when running the visualization it errors, complaining that an aggregation can't have both the physical field and the scripted data source in the same request. (This happens when the "advanced" JSON is merged with the settings defined in the GUI).Given all of the above setbacks, the hack that gave me the workaround was:
bogus
that returns "1".bogus
field in the histogramIt's perhaps a lucky accident that any of this works.
Can we make
_score
a valid metric for use in visualizations?The text was updated successfully, but these errors were encountered: