mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-08 22:14:59 +00:00
This commit adds a new API to allow scripts to say whether they need scores. In practice, only the `expression` script engine makes use of it correctly, other engines just return `true` since they can't predict whether they'll need scores. This should make scripted aggregations and `function_query` faster as we'll now be able to pass needsScores=false to Query.createWeight.