Move score script context from SearchScript to its own class#30816
Move score script context from SearchScript to its own class#30816martijnvg merged 6 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/es-core-infra |
rjernst
left a comment
There was a problem hiding this comment.
This is fantastic! I just have one comment.
There was a problem hiding this comment.
I think we want to keep the scorer. Having the script access score through get_score() (which maps to _score) allows score to not be computed when it is not used. needs_score only gets us so far (whether it is used at all). With get_score, we could (although I'm not sure it is actually implemented this way yet) call the method lazily to bind _score.
698a09e to
44ee02b
Compare
|
Thanks for reviewing! I've updated the pr and brought back setScorer() and added get_score() which is backed by a supplier that lazily computes the score if needed. |
rjernst
left a comment
There was a problem hiding this comment.
LGTM once the CI issue is addressed (need to add new ScoreScript to MockScriptEngine)
eb99619 to
18e13c1
Compare
* es/master: Move score script context from SearchScript to its own class (#30816) Fix bad version check writing Repository nodes (#30846) [docs] explainer for java packaging tests (#30825) Remove Throwable usage from transport modules (#30845) REST high-level client: add put ingest pipeline API (#30793) Update the version checks around ip_range bucket keys, now that the change was backported. Mute IndexMasterFailoverIT.testMasterFailoverDuringIndexingWithMappingChanges Use geohash cell instead of just a corner in geo_bounding_box (#30698) Limit user to single concurrent auth per realm (#30794) [Tests] Move templated _rank_eval tests (#30679) Security: fix dynamic mapping updates with aliases (#30787) Ensure that ip_range aggregations always return bucket keys. (#30701) Use remote client in TransportFieldCapsAction (#30838) Move Watcher versioning setting to meta field (#30832) [Docs] Explain incomplete dates in range queries (#30689) Move persistent task registrations to core (#30755) Decouple ClusterStateTaskListener & ClusterApplier (#30809) Send client headers from TransportClient (#30803) Packaging: Ensure upgrade_is_oss flag file is always deleted (#30732) Force stable file modes for built packages (#30823)
* es/6.x: Move score script context from SearchScript to its own class (#30816) Fix bad version check writing Repository nodes (#30846) Modify state of VerifyRepositoryResponse for bwc (#30762) QA: Fix tribe tests when running default zip Use remote client in TransportFieldCapsAction (#30838) Mute IndexMasterFailoverIT.testMasterFailoverDuringIndexingWithMappingChanges Ensure that ip_range aggregations always return bucket keys. (#30701) Limit user to single concurrent auth per realm (#30794) Security: fix dynamic mapping updates with aliases (#30787) [Tests] Move templated _rank_eval tests (#30679) Move Watcher versioning setting to meta field (#30832) Restore "Add more yaml tests for get alias API " (#30814) Send client headers from TransportClient (#30803) [Docs] Explain incomplete dates in range queries (#30689) Move persistent task registrations to core (#30755) Decouple ClusterStateTaskListener & ClusterApplier (#30809) Packaging: Ensure upgrade_is_oss flag file is always deleted (#30732) Force stable file modes for built packages (#30823)
No description provided.