Upgrade to lucene-7.2.0-snapshot-8c94404. (#27619)

This new snapshot mostly brings a change to TopFieldCollector which can now
early terminate collection when trackTotalHits is `false`.

As a follow-up, we should replace our usage of
`EarlyTerminatingSortingCollector` with this new option.
This commit is contained in:
Adrien Grand 2017-12-04 09:40:08 +01:00 committed by GitHub
parent 49df50f662
commit 6323bb0d97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
50 changed files with 31 additions and 29 deletions

View File

@ -1,5 +1,5 @@
elasticsearch = 7.0.0-alpha1
lucene = 7.2.0-snapshot-8c94404
lucene = 7.2.0-snapshot-7deca62
# optional dependencies
spatial4j = 0.6

View File

@ -0,0 +1 @@
0078019336ebd3ee475019c88a749ce8b7b261fd

View File

@ -1 +0,0 @@
4c515e5152e6938129a5e97c5afb5b3b360faed3

View File

@ -0,0 +1 @@
e66dfb2c0fb938a41d27059c923c3163187584c9

View File

@ -1 +0,0 @@
406c6cc0f8c2a47d42a1e343eaf2ad939fee905c

View File

@ -0,0 +1 @@
b79166ddbca0fddcb794026a22c363be1caecf5d

View File

@ -1 +0,0 @@
4c93f7fbc6e0caf87f7948b8481d80e0167133bf

View File

@ -0,0 +1 @@
dacc60bd0f55f75b24c434e2d715a10a91127fd0

View File

@ -1 +0,0 @@
b078ca50c6d579085c7755b4fd8de60711964dcc

View File

@ -0,0 +1 @@
9debc384c54d36b69aa8cd990fd047fc9ef00eea

View File

@ -1 +0,0 @@
fc5e61c8879f22b65ee053f1665bc9f13af79c1d

View File

@ -0,0 +1 @@
e048857ea7c66579d172295fc7394aa6163273d7

View File

@ -1 +0,0 @@
9a10839d3dfe7b369f0af8a78a630ee4d82e678e

View File

@ -0,0 +1 @@
9e8da627bcd3934e8b921810e71f225b1d2312ec

View File

@ -1 +0,0 @@
d45f2f51cf6f47a66ecafddecb83c1e08eb4061f

View File

@ -0,0 +1 @@
dfb4feab274c56d8a45098a398ea623e0d9d2a41

View File

@ -1 +0,0 @@
19cb7362be57104ad891259060af80fb4679e92c

View File

@ -0,0 +1 @@
e7962cf1c6a9654d428e0dceead0278083429044

View File

@ -1 +0,0 @@
ae24737048d95f56d0099fea77498324412eef50

View File

@ -0,0 +1 @@
6cc9de8bd74ded29572e0ca7ce14dc0ef11cefc4

View File

@ -1 +0,0 @@
a9d3422c9a72106026c19a8f76a4f4e62159ff5c

View File

@ -0,0 +1 @@
69f59c8ee5b0cad345af52f7ef1901b5828cf41a

View File

@ -1 +0,0 @@
66433006587ede3e01899fd6f5e55c8378032c2f

View File

@ -0,0 +1 @@
de04b5de5f08ef4699cbf3415753661ac69a1fda

View File

@ -1 +0,0 @@
b6b3082ba845f7bd41641b015624f46d4f20afb6

View File

@ -0,0 +1 @@
92c74817922c9ed6ec484453e21ffc5ba802b56c

View File

@ -1 +0,0 @@
7757cac49cb3e9f1a219346ce95fb80f61f7090e

View File

@ -0,0 +1 @@
99eff7d10daf8d53bba5a173a833dd2ac83fca55

View File

@ -1 +0,0 @@
92991fdcd185883050d9530ccc0d863b7a08e99c

View File

@ -0,0 +1 @@
1d44a9ed8ecefd3c6dceffa99f896ba957b7c31e

View File

@ -1 +0,0 @@
fb6a94b833a23a17e3721ea2f9679ad770dec48b

View File

@ -399,7 +399,7 @@ public class NestedQueryBuilder extends AbstractQueryBuilder<NestedQueryBuilder>
int topN = Math.min(from() + size(), context.searcher().getIndexReader().maxDoc());
TopDocsCollector<?> topDocsCollector;
if (sort() != null) {
topDocsCollector = TopFieldCollector.create(sort().sort, topN, true, trackScores(), trackScores());
topDocsCollector = TopFieldCollector.create(sort().sort, topN, true, trackScores(), trackScores(), true);
} else {
topDocsCollector = TopScoreDocCollector.create(topN);
}

View File

@ -117,8 +117,10 @@ public class TopHitsAggregator extends MetricsAggregator {
if (sort == null) {
topDocsCollector = TopScoreDocCollector.create(topN);
} else {
// TODO: can we pass trackTotalHits=subSearchContext.trackTotalHits(){
// Note that this would require to catch CollectionTerminatedException
topDocsCollector = TopFieldCollector.create(sort.sort, topN, true, subSearchContext.trackScores(),
subSearchContext.trackScores());
subSearchContext.trackScores(), true);
}
topDocsCollectors.put(bucket, topDocsCollector);
}

View File

@ -175,7 +175,7 @@ abstract class TopDocsCollectorContext extends QueryCollectorContext {
this.topDocsCollector = TopScoreDocCollector.create(numHits, searchAfter);
} else {
this.topDocsCollector = TopFieldCollector.create(sortAndFormats.sort, numHits,
(FieldDoc) searchAfter, true, trackMaxScore, trackMaxScore);
(FieldDoc) searchAfter, true, trackMaxScore, trackMaxScore, true);
}
}

View File

@ -130,7 +130,7 @@ public class CollapsingTopDocsCollectorTests extends ESTestCase {
}
TopFieldCollector topFieldCollector =
TopFieldCollector.create(sort, totalHits, true, trackMaxScores, trackMaxScores);
TopFieldCollector.create(sort, totalHits, true, trackMaxScores, trackMaxScores, true);
searcher.search(new MatchAllDocsQuery(), collapsingCollector);
searcher.search(new MatchAllDocsQuery(), topFieldCollector);

View File

@ -0,0 +1 @@
fc180cf3b83df42ebdc18416ddbca2c4890914c3

View File

@ -1 +0,0 @@
5d4b0551a5f745ddf630184b8f63d9d03b4f4003

View File

@ -170,7 +170,7 @@ class ParentChildInnerHitContextBuilder extends InnerHitContextBuilder {
int topN = Math.min(from() + size(), context.searcher().getIndexReader().maxDoc());
TopDocsCollector<?> topDocsCollector;
if (sort() != null) {
topDocsCollector = TopFieldCollector.create(sort().sort, topN, true, trackScores(), trackScores());
topDocsCollector = TopFieldCollector.create(sort().sort, topN, true, trackScores(), trackScores(), true);
} else {
topDocsCollector = TopScoreDocCollector.create(topN);
}
@ -261,7 +261,7 @@ class ParentChildInnerHitContextBuilder extends InnerHitContextBuilder {
int topN = Math.min(from() + size(), context.searcher().getIndexReader().maxDoc());
TopDocsCollector<?> topDocsCollector;
if (sort() != null) {
topDocsCollector = TopFieldCollector.create(sort().sort, topN, true, trackScores(), trackScores());
topDocsCollector = TopFieldCollector.create(sort().sort, topN, true, trackScores(), trackScores(), true);
} else {
topDocsCollector = TopScoreDocCollector.create(topN);
}

View File

@ -0,0 +1 @@
28f92af20fc24d2adba2cab91ca5d7dfcf6ddf34

View File

@ -1 +0,0 @@
f18454bf4be4698f7e6f3a7c950f75ee3fa4436e

View File

@ -0,0 +1 @@
85eb5c6a3d27be95bd7a982055e20dcacb242a6b

View File

@ -1 +0,0 @@
a09ec54a9434987a16a4d9b68ca301a5a3bf4123

View File

@ -0,0 +1 @@
b4e2d20a4ec764b73f7a64200bfe4de8c7928c9e

View File

@ -1 +0,0 @@
f86560f04296d8d34fed535abbf8002e0985b1df

View File

@ -0,0 +1 @@
df3bd90eab8edc2ad1ee9212f9589189f0007653

View File

@ -1 +0,0 @@
dec7d0bee4de2ac8eb5aec9cb5d244c5b405bc15

View File

@ -0,0 +1 @@
bef9b75d220eb4f95a91696c69ae6f5b489b4a43

View File

@ -1 +0,0 @@
8469b05416dcaf6ddeebcdabb551b4ccf009f7c2

View File

@ -0,0 +1 @@
ae0c475cfbc5d9a9eec79daff9260f1bbf12daed

View File

@ -1 +0,0 @@
6de67186607bde2ac66b216af4e1fadffaf43e21