You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use script_score to modify a score. I use a bool query but when running this under script_score it results in a null pointer exception. If I remove the bool query and run a simple match query it works.
Steps to reproduce:
Please include a minimal but complete recreation of the problem, including
(e.g.) index creation, mappings, settings, query etc. The easier you make for
us to reproduce it, the more likely that somebody will take the time to look at it.
Thanks for reporting @davidb-e4s , this bug is already fixed by #48425 so I hope you don't mind if I close this. The next minor release (7.6.0) will contain the fix.
Hosted ES in elastic cloud (GCP) v7.5.1
I am trying to use script_score to modify a score. I use a bool query but when running this under script_score it results in a null pointer exception. If I remove the bool query and run a simple match query it works.
Steps to reproduce:
Please include a minimal but complete recreation of the problem, including
(e.g.) index creation, mappings, settings, query etc. The easier you make for
us to reproduce it, the more likely that somebody will take the time to look at it.
Example query below
{ "query": { "script_score": { "query": { "bool": { "filter": [ { "range": { "validFrom": { "from": null, "to": "2020-01-08" } } } ] } }, "script": { "source": "_score + (doc['boostScore'].value)", "lang": "painless" } } } }
This example works
{ "query": { "script_score": { "query": { "match": { "message": "elasticsearch" } }, "script": { "source": "_score + (doc['boostScore'].value)", "lang": "painless" } } } }
The text was updated successfully, but these errors were encountered: