Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport] [2.x] Update to Lucene 9.3.0 (#4043) #4088

Merged
merged 1 commit into from
Aug 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update to Lucene 9.3.0 (#4043)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
(cherry picked from commit bab2e59)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
  • Loading branch information
reta committed Aug 2, 2022
commit 736b90ecc59691c06c6be85ff56d429ac5882b3b
2 changes: 1 addition & 1 deletion buildSrc/version.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
opensearch = 2.2.0
lucene = 9.3.0-snapshot-b7231bb
lucene = 9.3.0

bundled_jdk_vendor = adoptium
bundled_jdk = 17.0.3+7
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5583bcd3a24d3aae40b0a3152458021844ac09aa

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
11dd9be0448fe594cf918f5260e193b3ab4e07a0

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
87c1357612f2f483174d1a63ea8c6680a1696bac

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5d032dbeb3f4015741336a877dd4b0e62099246c

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fe6ac8772b545e0abd0c755cd4bd07caad58edb9

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
288726e13b598c341e81aef8b5c9ce53f51889d0

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
166d02f7f98f18c6607335030a404fcad8f57cd6

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3c0e4177aa87a4be2826a360f656f3559ea3f997

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-analysis-common-9.3.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
03496708a19a8a55a0dc4f61f8aa2febc6e8977c

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-backward-codecs-9.3.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
95ea01ee0d1e543e18e3cf58d8a6a27a587a7239

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-core-9.3.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a030180999bc3f1a65f23f53b38098ca9daeee79

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-grouping-9.3.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
883071196e53ec93d2a53dcc8211ee30be6c00dc

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-highlighter-9.3.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7e895c49b9991ea2ec08855c425b9eae44a08764

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-join-9.3.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
04baaae4ce4a35ae919150dd17cd1e63b0da9d24

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-memory-9.3.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1a2203b332edc1366b9789f5286296e109dbc8c4

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-misc-9.3.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
61b502c9557247b6803a346c0bab20c9dc89d125

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-queries-9.3.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d8fe3bce3c05015c5fdb78279f36b9f1a75b98d8

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-queryparser-9.3.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
78f259a66d48f77a2d2b96a0a858efa08eba72dc

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-sandbox-9.3.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5ee318cf8e9a70c2c99e03e157465316a3d4a17a

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-spatial-extras-9.3.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c9b226b49ae987a4226791f023562187583eb9ad

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-spatial3d-9.3.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
201aa61856ae44fa494504591aed54fd9b75af16

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-suggest-9.3.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fb5d7243ba67616edbda1ecf421c615dd595752d
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public long cost() {
}

@Override
public long docValueCount() {
public int docValueCount() {
return values.docValueCount();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ public BytesRef lookupOrd(long ord) {
}

@Override
public long docValueCount() {
return currentEndOffset - currentOffset;
public int docValueCount() {
return Math.toIntExact(currentEndOffset - currentOffset);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ public boolean advanceExact(int doc) throws IOException {
}

@Override
public long docValueCount() {
public int docValueCount() {
return values.docValueCount();
}

Expand Down Expand Up @@ -346,7 +346,7 @@ public long getValueCount() {
}

@Override
public long docValueCount() {
public int docValueCount() {
return values.docValueCount();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ protected void search(List<LeafReaderContext> leaves, Weight weight, Collector c
private void searchLeaf(LeafReaderContext ctx, Weight weight, Collector collector) throws IOException {
cancellable.checkCancelled();
weight = wrapWeight(weight);
// See please https://github.com/apache/lucene/pull/964
collector.setWeight(weight);
final LeafCollector leafCollector;
try {
leafCollector = collector.getLeafCollector(ctx);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

package org.opensearch.search.query;

import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.search.CollectorManager;
import org.apache.lucene.search.LeafCollector;
import org.apache.lucene.search.Scorable;
import org.apache.lucene.search.ScoreMode;
import org.apache.lucene.search.Sort;
import org.apache.lucene.search.TopDocs;
Expand All @@ -33,7 +36,15 @@ public class TotalHitCountCollectorManager

private static final TotalHitCountCollector EMPTY_COLLECTOR = new TotalHitCountCollector() {
@Override
public void collect(int doc) {}
public LeafCollector getLeafCollector(LeafReaderContext context) throws IOException {
return new LeafCollector() {
@Override
public void setScorer(Scorable scorer) throws IOException {}

@Override
public void collect(int doc) throws IOException {}
};
}

@Override
public ScoreMode scoreMode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ public long getValueCount() {
}

@Override
public long docValueCount() {
public int docValueCount() {
return array[doc].length;
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public long getValueCount() {
}

@Override
public long docValueCount() {
public int docValueCount() {
return ords.length;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public long getValueCount() {
}

@Override
public long docValueCount() {
public int docValueCount() {
return 1;
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public long nextOrd() {
}

@Override
public long docValueCount() {
public int docValueCount() {
return ords[doc].length;
}
};
Expand Down Expand Up @@ -263,7 +263,7 @@ public BytesRef lookupOrd(long ord) throws IOException {
}

@Override
public long docValueCount() {
public int docValueCount() {
throw new UnsupportedOperationException();
}

Expand Down