Upgrade to latest Lucene snapshot#33505
Upgrade to latest Lucene snapshot#33505romseygeek merged 10 commits intoelastic:masterfrom romseygeek:lucene-8-upgrade
Conversation
romseygeek
commented
Sep 7, 2018
- Collectors now take Scorable
- Adds IndexWriter.getFlushingBytes()
|
Pinging @elastic/es-search-aggs |
| // when minScore is set, scores might be requested twice: once | ||
| // to verify the match, and once by the collector | ||
| scorer = new ScoreCachingWrappingScorer(scorer); | ||
| } |
There was a problem hiding this comment.
ScoreCachingWrapperScorer is now a Scorable, so this no longer works. Instead I've just duplicated the caching logic here. Given that SCWS is only ever applied by Collectors, and this is a real Scorer (so won't be generated by a Collector), we don't need to worry about double wrapping.
There was a problem hiding this comment.
you probably need to fix the two-phase iterator to call this.score() rather than in.score() as well then, or otherwise it by-passes caching?
There was a problem hiding this comment.
actually maybe the two-phase iterator could just do curScore = in.score(); return curScore >= minScore; and then score() wouldn't even have to check the current doc ID
There was a problem hiding this comment.
++
I also changed MinScoreScorerTests to check that score() only gets called once on the wrapped Scorable.
jpountz
left a comment
There was a problem hiding this comment.
One minor problem to address, otherwise LGTM!
| // when minScore is set, scores might be requested twice: once | ||
| // to verify the match, and once by the collector | ||
| scorer = new ScoreCachingWrappingScorer(scorer); | ||
| } |
There was a problem hiding this comment.
you probably need to fix the two-phase iterator to call this.score() rather than in.score() as well then, or otherwise it by-passes caching?
| // when minScore is set, scores might be requested twice: once | ||
| // to verify the match, and once by the collector | ||
| scorer = new ScoreCachingWrappingScorer(scorer); | ||
| } |
There was a problem hiding this comment.
actually maybe the two-phase iterator could just do curScore = in.score(); return curScore >= minScore; and then score() wouldn't even have to check the current doc ID
* master: Add full cluster restart base class (elastic#33577) Validate list values for settings (elastic#33503) Copy and validatie soft-deletes setting on resize (elastic#33517) Test: Fix package name SQL: Fix result column names for arithmetic functions (elastic#33500) Upgrade to latest Lucene snapshot (elastic#33505) Enable not wiping cluster settings after REST test (elastic#33575) MINOR: Remove Dead Code in SearchScript (elastic#33569) [Test] Remove duplicate method in TestShardRouting (elastic#32815) mute test on windows Update beats template to include apm-server metrics (elastic#33286) Fix typos (elastic#33499) [CCR] Delay auto follow license check (elastic#33557) [CCR] Add create_follow_index privilege (elastic#33559) Strengthen FilterRoutingTests (elastic#33149) Correctly handle PKCS#11 tokens for system keystore (elastic#33460) Remove some duplicate request conversion methods. (elastic#33538)
* master: (91 commits) Preserve cluster settings on full restart tests (elastic#33590) Use IndexWriter.getFlushingBytes() rather than tracking it ourselves (elastic#33582) Fix upgrading of list settings (elastic#33589) Add read-only Engine (elastic#33563) HLRC: Add ML get categories API (elastic#33465) SQL: Adds MONTHNAME, DAYNAME and QUARTER functions (elastic#33411) Add predicate_token_filter (elastic#33431) Fix Replace function. Adds more tests to all string functions. (elastic#33478) [ML] Rename input_fields to column_names in file structure (elastic#33568) Add full cluster restart base class (elastic#33577) Validate list values for settings (elastic#33503) Copy and validatie soft-deletes setting on resize (elastic#33517) Test: Fix package name SQL: Fix result column names for arithmetic functions (elastic#33500) Upgrade to latest Lucene snapshot (elastic#33505) Enable not wiping cluster settings after REST test (elastic#33575) MINOR: Remove Dead Code in SearchScript (elastic#33569) [Test] Remove duplicate method in TestShardRouting (elastic#32815) mute test on windows Update beats template to include apm-server metrics (elastic#33286) ...