-
Notifications
You must be signed in to change notification settings - Fork 24.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add 'key' field to function_score query function for explanation retrieval #46007
Comments
Pinging @elastic/es-search |
@lrynek Thank you for filling the issue. Our current plan is to deprecate a I will keep this issue open though, as it suggests an interesting idea for a new query type we are thinking -- a complex boolean query that can combine clauses' scores in multiple ways. May not be completely relevant to your issue, but ES has a concept of named queries that may help your usecase. |
@mayya-sharipova Thank you for the response and the tip about named queries - it is very useful 🙂. Looking forward to see the new ES compound query, please take into account this feature - it would be perfect to identify particular scoring values in the ES response! 🤞 |
function_score
query function for explanation retrieval
function_score
query function for explanation retrieval
@mayya-sharipova Hi! 👋 🙂 Any notice about this feature request? 🙏 Do you mind adding it in previous ES versions maybe (6.x as well)? |
@mayya-sharipova any update on this - it would be awesome to have such a feature // maybe at least at 7.x version? // or it is better to do via a plugin? Thanks for any insight 😊 |
Pinging @elastic/es-search (Team:Search) |
@mayya-sharipova maybe you can take advantage of the change made in OpenSearch (same concept applied as for |
Pinging @elastic/es-search-relevance (Team:Search Relevance) |
When trying to extract current factor value from
_explanation
part of ElasticSearch JSON response (i.e. for debugging or logging purposes), I can do it only with text matching of a script body (and only with those functions that operates on script language, thefilter
ones are out of reach). I would add a new fieldkey
(or whatever name suits best) to thefunction_score
queryfunctions
array items, as follows:Now
(see: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html)
Request
Response
After implementation
Request
Response
The retrieval of specific computed values will be more precise after such or similar implementation.
The text was updated successfully, but these errors were encountered: