I'm trying to get started in using Groovy scripts, and I'm having some trouble understanding scope/limitations of the Groovy "API." At a high level, I'm trying to build queries that return what could be called "multi-score" queries (e.g., "document 1 scored 80% for relevance to your query and 90% for popularity/quality, giving a combined score of 85%" where all three numbers appear in the search results). To do this, I've been experimenting with computing the component scores using
script_fields, and an overall score using
Here's the main issues I've been running into thus far:
- Is there any way to access the
inner_hitsdata from a
nestedquery from within Groovy script?
- Is there any way to access script fields within a