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] [Upgrade] Lucene 9.5.0 release (#6078) #6116

Merged
merged 2 commits into from
Jan 31, 2023
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- OpenJDK Update (January 2023 Patch releases) ([#6075](https://github.com/opensearch-project/OpenSearch/pull/6075))
- Bumps `Mockito` from 4.7.0 to 5.1.0, `ByteBuddy` from 1.12.18 to 1.12.22 ([#6088](https://github.com/opensearch-project/OpenSearch/pull/6088))
- Bumps `joda` from 2.10.13 to 2.12.2 ([#6095](https://github.com/opensearch-project/OpenSearch/pull/6095))
- Upgrade to Lucene 9.5.0 ([#6078](https://github.com/opensearch-project/OpenSearch/pull/6078))
- Bump antlr4 from 4.9.3 to 4.11.1 ([#6116](https://github.com/opensearch-project/OpenSearch/pull/6116))

### Changed
- Use ReplicationFailedException instead of OpensearchException in ReplicationTarget ([#4725](https://github.com/opensearch-project/OpenSearch/pull/4725))
Expand Down
5 changes: 3 additions & 2 deletions buildSrc/version.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
opensearch = 2.6.0
lucene = 9.4.2
lucene = 9.5.0

bundled_jdk_vendor = adoptium
bundled_jdk = 17.0.6+10
Expand All @@ -12,13 +12,14 @@ jackson_databind = 2.14.1
snakeyaml = 1.32
icu4j = 70.1
supercsv = 2.4.0
# Update to 2.17.2+ is breaking OpenSearchJsonLayout (see https://issues.apache.org/jira/browse/LOG4J2-3562)
# Update to 2.17.2+ is breaking OpenSearchJsonLayout (see https://issues.apache.org/jira/browse/LOG4J2-3562)
log4j = 2.17.1
slf4j = 1.7.36
asm = 9.4
jettison = 1.5.1
woodstox = 6.4.0
kotlin = 1.7.10
antlr4 = 4.11.1

# when updating the JNA version, also update the version in buildSrc/build.gradle
jna = 5.5.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import static org.opensearch.client.Requests.searchRequest;
import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.opensearch.index.query.QueryBuilders.boolQuery;
import static org.opensearch.index.query.QueryBuilders.matchAllQuery;
import static org.opensearch.index.query.QueryBuilders.matchPhrasePrefixQuery;
import static org.opensearch.index.query.QueryBuilders.matchPhraseQuery;
import static org.opensearch.index.query.QueryBuilders.matchQuery;
Expand All @@ -61,6 +62,7 @@
import static org.hamcrest.Matchers.anyOf;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.startsWith;
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount;

public class HighlighterWithAnalyzersTests extends OpenSearchIntegTestCase {
@Override
Expand Down Expand Up @@ -270,9 +272,13 @@ public void testPhrasePrefix() throws IOException {
refresh();
logger.info("--> highlighting and searching on field0");

SearchSourceBuilder source = searchSource().query(matchPhrasePrefixQuery("field0", "bro"))
.highlighter(highlight().field("field0").order("score").preTags("<x>").postTags("</x>"));
SearchSourceBuilder source = searchSource().query(matchAllQuery());
SearchResponse searchResponse = client().search(searchRequest("first_test_index").source(source)).actionGet();
assertHitCount(searchResponse, 2);

source = searchSource().query(matchPhrasePrefixQuery("field0", "bro"))
.highlighter(highlight().field("field0").order("score").preTags("<x>").postTags("</x>"));
searchResponse = client().search(searchRequest("first_test_index").source(source)).actionGet();

assertHighlight(searchResponse, 0, "field0", 0, 1, equalTo("The quick <x>brown</x> fox jumps over the lazy dog"));

Expand Down Expand Up @@ -415,6 +421,7 @@ public void testPhrasePrefix() throws IOException {
public static XContentBuilder type1TermVectorMapping() throws IOException {
return XContentFactory.jsonBuilder()
.startObject()
.startObject("_doc")
.startObject("properties")
.startObject("field1")
.field("type", "text")
Expand All @@ -425,6 +432,7 @@ public static XContentBuilder type1TermVectorMapping() throws IOException {
.field("term_vector", "with_positions_offsets")
.endObject()
.endObject()
.endObject()
.endObject();
}
}
2 changes: 1 addition & 1 deletion modules/lang-expression/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ opensearchplugin {

dependencies {
api "org.apache.lucene:lucene-expressions:${versions.lucene}"
api 'org.antlr:antlr4-runtime:4.9.3'
api "org.antlr:antlr4-runtime:${versions.antlr4}"
api "org.ow2.asm:asm:${versions.asm}"
api "org.ow2.asm:asm-commons:${versions.asm}"
api "org.ow2.asm:asm-tree:${versions.asm}"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
069214c1de1960040729702eb58deac8827135e7

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
62f3d3630ecc14069d5c24b9693df5a2787f8202
4 changes: 2 additions & 2 deletions modules/lang-painless/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ testClusters.all {
}

dependencies {
api 'org.antlr:antlr4-runtime:4.9.3'
api "org.antlr:antlr4-runtime:${versions.antlr4}"
api "org.ow2.asm:asm-util:${versions.asm}"
api "org.ow2.asm:asm-tree:${versions.asm}"
api "org.ow2.asm:asm-commons:${versions.asm}"
Expand Down Expand Up @@ -160,7 +160,7 @@ configurations {
}

dependencies {
regenerate 'org.antlr:antlr4:4.5.3'
regenerate "org.antlr:antlr4:${versions.antlr4}"
}

String grammarPath = 'src/main/antlr'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
069214c1de1960040729702eb58deac8827135e7

This file was deleted.

Loading