diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d0920a69dd83..e3c96d059ac4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Added ### Dependencies +- Update to Apache Lucene 9.11.0 ([#14042](https://github.com/opensearch-project/OpenSearch/pull/14042)) ### Changed diff --git a/buildSrc/version.properties b/buildSrc/version.properties index 2d757ec6bb4a8..316719e8e7e77 100644 --- a/buildSrc/version.properties +++ b/buildSrc/version.properties @@ -1,5 +1,5 @@ opensearch = 2.16.0 -lucene = 9.10.0 +lucene = 9.11.0 bundled_jdk_vendor = adoptium bundled_jdk = 21.0.3+9 diff --git a/libs/core/licenses/lucene-core-9.10.0.jar.sha1 b/libs/core/licenses/lucene-core-9.10.0.jar.sha1 deleted file mode 100644 index 31b6bcd29f418..0000000000000 --- a/libs/core/licenses/lucene-core-9.10.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -64e5624754d59386be5d9159c68f81ff96298704 \ No newline at end of file diff --git a/libs/core/licenses/lucene-core-9.11.0.jar.sha1 b/libs/core/licenses/lucene-core-9.11.0.jar.sha1 new file mode 100644 index 0000000000000..b0d38c4165581 --- /dev/null +++ b/libs/core/licenses/lucene-core-9.11.0.jar.sha1 @@ -0,0 +1 @@ +2e487755a6814b2a1bc770c26569dcba86873dcf \ No newline at end of file diff --git a/libs/core/src/main/java/org/opensearch/Version.java b/libs/core/src/main/java/org/opensearch/Version.java index c5de61f1e5ccd..53c8810abe912 100644 --- a/libs/core/src/main/java/org/opensearch/Version.java +++ b/libs/core/src/main/java/org/opensearch/Version.java @@ -133,7 +133,7 @@ public class Version implements Comparable, ToXContentFragment { public static final Version V_2_14_0 = new Version(2140099, org.apache.lucene.util.Version.LUCENE_9_10_0); public static final Version V_2_14_1 = new Version(2140199, org.apache.lucene.util.Version.LUCENE_9_10_0); public static final Version V_2_15_0 = new Version(2150099, org.apache.lucene.util.Version.LUCENE_9_10_0); - public static final Version V_2_16_0 = new Version(2160099, org.apache.lucene.util.Version.LUCENE_9_10_0); + public static final Version V_2_16_0 = new Version(2160099, org.apache.lucene.util.Version.LUCENE_9_11_0); public static final Version CURRENT = V_2_16_0; public static Version fromId(int id) { diff --git a/modules/lang-expression/licenses/lucene-expressions-9.10.0.jar.sha1 b/modules/lang-expression/licenses/lucene-expressions-9.10.0.jar.sha1 deleted file mode 100644 index 4c85d77f41cd6..0000000000000 --- a/modules/lang-expression/licenses/lucene-expressions-9.10.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -e2daf2e568fe120e84567505f7c85643bb0b9dd2 \ No newline at end of file diff --git a/modules/lang-expression/licenses/lucene-expressions-9.11.0.jar.sha1 b/modules/lang-expression/licenses/lucene-expressions-9.11.0.jar.sha1 new file mode 100644 index 0000000000000..29aade3ad4298 --- /dev/null +++ b/modules/lang-expression/licenses/lucene-expressions-9.11.0.jar.sha1 @@ -0,0 +1 @@ +5e21d20edee0712472e7c6f605c9d97aeecf16c0 \ No newline at end of file diff --git a/plugins/analysis-icu/licenses/lucene-analysis-icu-9.10.0.jar.sha1 b/plugins/analysis-icu/licenses/lucene-analysis-icu-9.10.0.jar.sha1 deleted file mode 100644 index a6f523b96685c..0000000000000 --- a/plugins/analysis-icu/licenses/lucene-analysis-icu-9.10.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -ed54097d13dbaae6e758c31f55a473ba6566ae8d \ No newline at end of file diff --git a/plugins/analysis-icu/licenses/lucene-analysis-icu-9.11.0.jar.sha1 b/plugins/analysis-icu/licenses/lucene-analysis-icu-9.11.0.jar.sha1 new file mode 100644 index 0000000000000..6f0501d3312ae --- /dev/null +++ b/plugins/analysis-icu/licenses/lucene-analysis-icu-9.11.0.jar.sha1 @@ -0,0 +1 @@ +5c7f2d8eab0fca3fdc3d3e57a7f48a335dc7ac33 \ No newline at end of file diff --git a/plugins/analysis-kuromoji/licenses/lucene-analysis-kuromoji-9.10.0.jar.sha1 b/plugins/analysis-kuromoji/licenses/lucene-analysis-kuromoji-9.10.0.jar.sha1 deleted file mode 100644 index 0572d78c75516..0000000000000 --- a/plugins/analysis-kuromoji/licenses/lucene-analysis-kuromoji-9.10.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -a158d8a7d386c782a10ec15827ff3f0aa6fd8291 \ No newline at end of file diff --git a/plugins/analysis-kuromoji/licenses/lucene-analysis-kuromoji-9.11.0.jar.sha1 b/plugins/analysis-kuromoji/licenses/lucene-analysis-kuromoji-9.11.0.jar.sha1 new file mode 100644 index 0000000000000..25031381c9cb3 --- /dev/null +++ b/plugins/analysis-kuromoji/licenses/lucene-analysis-kuromoji-9.11.0.jar.sha1 @@ -0,0 +1 @@ +efcf65dda1b4e9d7e83926fd5895a47e491cbf29 \ No newline at end of file diff --git a/plugins/analysis-nori/licenses/lucene-analysis-nori-9.10.0.jar.sha1 b/plugins/analysis-nori/licenses/lucene-analysis-nori-9.10.0.jar.sha1 deleted file mode 100644 index b81b33d7b28f7..0000000000000 --- a/plugins/analysis-nori/licenses/lucene-analysis-nori-9.10.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -79eb4c5e1c92b613341d05173dfcdce182fa5f80 \ No newline at end of file diff --git a/plugins/analysis-nori/licenses/lucene-analysis-nori-9.11.0.jar.sha1 b/plugins/analysis-nori/licenses/lucene-analysis-nori-9.11.0.jar.sha1 new file mode 100644 index 0000000000000..e27d45b217dad --- /dev/null +++ b/plugins/analysis-nori/licenses/lucene-analysis-nori-9.11.0.jar.sha1 @@ -0,0 +1 @@ +59599d7b8bed2e6bd27d0dad7935c078b98c39cc \ No newline at end of file diff --git a/plugins/analysis-phonetic/licenses/lucene-analysis-phonetic-9.10.0.jar.sha1 b/plugins/analysis-phonetic/licenses/lucene-analysis-phonetic-9.10.0.jar.sha1 deleted file mode 100644 index 66245cc1d36d9..0000000000000 --- a/plugins/analysis-phonetic/licenses/lucene-analysis-phonetic-9.10.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -b6ba8f0ecee48b94911c08ee12c20f059ec38ec5 \ No newline at end of file diff --git a/plugins/analysis-phonetic/licenses/lucene-analysis-phonetic-9.11.0.jar.sha1 b/plugins/analysis-phonetic/licenses/lucene-analysis-phonetic-9.11.0.jar.sha1 new file mode 100644 index 0000000000000..ad5473865537d --- /dev/null +++ b/plugins/analysis-phonetic/licenses/lucene-analysis-phonetic-9.11.0.jar.sha1 @@ -0,0 +1 @@ +e55f83bb373ac139e313f64e80afe1eb0a75b8c0 \ No newline at end of file diff --git a/plugins/analysis-smartcn/licenses/lucene-analysis-smartcn-9.10.0.jar.sha1 b/plugins/analysis-smartcn/licenses/lucene-analysis-smartcn-9.10.0.jar.sha1 deleted file mode 100644 index 5f17e786f91d5..0000000000000 --- a/plugins/analysis-smartcn/licenses/lucene-analysis-smartcn-9.10.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -ccf4512816ba9cd5c2cca9182db78a2e48e7e16f \ No newline at end of file diff --git a/plugins/analysis-smartcn/licenses/lucene-analysis-smartcn-9.11.0.jar.sha1 b/plugins/analysis-smartcn/licenses/lucene-analysis-smartcn-9.11.0.jar.sha1 new file mode 100644 index 0000000000000..68abd162e7266 --- /dev/null +++ b/plugins/analysis-smartcn/licenses/lucene-analysis-smartcn-9.11.0.jar.sha1 @@ -0,0 +1 @@ +1be59d91c45a4de069611fb7f8aa3e8fd26020ec \ No newline at end of file diff --git a/plugins/analysis-stempel/licenses/lucene-analysis-stempel-9.10.0.jar.sha1 b/plugins/analysis-stempel/licenses/lucene-analysis-stempel-9.10.0.jar.sha1 deleted file mode 100644 index f7b19bc3b38cd..0000000000000 --- a/plugins/analysis-stempel/licenses/lucene-analysis-stempel-9.10.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -b596817e70f00bc54d66e82c118f47ca91b9e401 \ No newline at end of file diff --git a/plugins/analysis-stempel/licenses/lucene-analysis-stempel-9.11.0.jar.sha1 b/plugins/analysis-stempel/licenses/lucene-analysis-stempel-9.11.0.jar.sha1 new file mode 100644 index 0000000000000..c5f1521ec3769 --- /dev/null +++ b/plugins/analysis-stempel/licenses/lucene-analysis-stempel-9.11.0.jar.sha1 @@ -0,0 +1 @@ +d5b5922acf3743b5a0c542959dd93fca8be333a7 \ No newline at end of file diff --git a/plugins/analysis-ukrainian/licenses/lucene-analysis-morfologik-9.10.0.jar.sha1 b/plugins/analysis-ukrainian/licenses/lucene-analysis-morfologik-9.10.0.jar.sha1 deleted file mode 100644 index 7fb543858c1a7..0000000000000 --- a/plugins/analysis-ukrainian/licenses/lucene-analysis-morfologik-9.10.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -7acc74d35684269ffa74909395044e0e02581285 \ No newline at end of file diff --git a/plugins/analysis-ukrainian/licenses/lucene-analysis-morfologik-9.11.0.jar.sha1 b/plugins/analysis-ukrainian/licenses/lucene-analysis-morfologik-9.11.0.jar.sha1 new file mode 100644 index 0000000000000..b676ca507467a --- /dev/null +++ b/plugins/analysis-ukrainian/licenses/lucene-analysis-morfologik-9.11.0.jar.sha1 @@ -0,0 +1 @@ +50fd7b471cbdd6648c4972169f3fc67fae9db7f6 \ No newline at end of file diff --git a/server/licenses/lucene-analysis-common-9.10.0.jar.sha1 b/server/licenses/lucene-analysis-common-9.10.0.jar.sha1 deleted file mode 100644 index d33a965b3506c..0000000000000 --- a/server/licenses/lucene-analysis-common-9.10.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -92e559808a23f61c818ef90a9ccab3669a25caa0 \ No newline at end of file diff --git a/server/licenses/lucene-analysis-common-9.11.0.jar.sha1 b/server/licenses/lucene-analysis-common-9.11.0.jar.sha1 new file mode 100644 index 0000000000000..7139f6a43a15a --- /dev/null +++ b/server/licenses/lucene-analysis-common-9.11.0.jar.sha1 @@ -0,0 +1 @@ +75a0a333cf1e043102743066c929e65fe51cbcda \ No newline at end of file diff --git a/server/licenses/lucene-backward-codecs-9.10.0.jar.sha1 b/server/licenses/lucene-backward-codecs-9.10.0.jar.sha1 deleted file mode 100644 index 01b6cbb54f3e9..0000000000000 --- a/server/licenses/lucene-backward-codecs-9.10.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -6570ebf974d07025ad4cd9ffaa9927546b534704 \ No newline at end of file diff --git a/server/licenses/lucene-backward-codecs-9.11.0.jar.sha1 b/server/licenses/lucene-backward-codecs-9.11.0.jar.sha1 new file mode 100644 index 0000000000000..735e80b60b001 --- /dev/null +++ b/server/licenses/lucene-backward-codecs-9.11.0.jar.sha1 @@ -0,0 +1 @@ +db385446bc3fd70e7c6a744276c0a157bd60ee0a \ No newline at end of file diff --git a/server/licenses/lucene-core-9.10.0.jar.sha1 b/server/licenses/lucene-core-9.10.0.jar.sha1 deleted file mode 100644 index 31b6bcd29f418..0000000000000 --- a/server/licenses/lucene-core-9.10.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -64e5624754d59386be5d9159c68f81ff96298704 \ No newline at end of file diff --git a/server/licenses/lucene-core-9.11.0.jar.sha1 b/server/licenses/lucene-core-9.11.0.jar.sha1 new file mode 100644 index 0000000000000..b0d38c4165581 --- /dev/null +++ b/server/licenses/lucene-core-9.11.0.jar.sha1 @@ -0,0 +1 @@ +2e487755a6814b2a1bc770c26569dcba86873dcf \ No newline at end of file diff --git a/server/licenses/lucene-grouping-9.10.0.jar.sha1 b/server/licenses/lucene-grouping-9.10.0.jar.sha1 deleted file mode 100644 index 21f2062273355..0000000000000 --- a/server/licenses/lucene-grouping-9.10.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -b82838299e4fa423fc574c1c07405410823f74ce \ No newline at end of file diff --git a/server/licenses/lucene-grouping-9.11.0.jar.sha1 b/server/licenses/lucene-grouping-9.11.0.jar.sha1 new file mode 100644 index 0000000000000..562de95605b60 --- /dev/null +++ b/server/licenses/lucene-grouping-9.11.0.jar.sha1 @@ -0,0 +1 @@ +882bdaf209b0acb332aa34836616424bcbecf462 \ No newline at end of file diff --git a/server/licenses/lucene-highlighter-9.10.0.jar.sha1 b/server/licenses/lucene-highlighter-9.10.0.jar.sha1 deleted file mode 100644 index 2148a8ef957f0..0000000000000 --- a/server/licenses/lucene-highlighter-9.10.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -2f21ade4b4896f1ece2b3a823e1640c762c9d0cf \ No newline at end of file diff --git a/server/licenses/lucene-highlighter-9.11.0.jar.sha1 b/server/licenses/lucene-highlighter-9.11.0.jar.sha1 new file mode 100644 index 0000000000000..e0ef36d321c9d --- /dev/null +++ b/server/licenses/lucene-highlighter-9.11.0.jar.sha1 @@ -0,0 +1 @@ +44accdc03c5482e602718f7bf91e5940ba4e4870 \ No newline at end of file diff --git a/server/licenses/lucene-join-9.10.0.jar.sha1 b/server/licenses/lucene-join-9.10.0.jar.sha1 deleted file mode 100644 index 93b8f50522800..0000000000000 --- a/server/licenses/lucene-join-9.10.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -541b722bb842817e2ec899cd4d0de2a136953f53 \ No newline at end of file diff --git a/server/licenses/lucene-join-9.11.0.jar.sha1 b/server/licenses/lucene-join-9.11.0.jar.sha1 new file mode 100644 index 0000000000000..34c618ccfbcc7 --- /dev/null +++ b/server/licenses/lucene-join-9.11.0.jar.sha1 @@ -0,0 +1 @@ +32a30ee03ed4f3e43bf63250270b2d4d53050045 \ No newline at end of file diff --git a/server/licenses/lucene-memory-9.10.0.jar.sha1 b/server/licenses/lucene-memory-9.10.0.jar.sha1 deleted file mode 100644 index 82ca74ccdfc42..0000000000000 --- a/server/licenses/lucene-memory-9.10.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -06620029b6c7d84480fb7ad1ba0d72963111b765 \ No newline at end of file diff --git a/server/licenses/lucene-memory-9.11.0.jar.sha1 b/server/licenses/lucene-memory-9.11.0.jar.sha1 new file mode 100644 index 0000000000000..d730cfb4b7660 --- /dev/null +++ b/server/licenses/lucene-memory-9.11.0.jar.sha1 @@ -0,0 +1 @@ +b3e80aa6aa3299118e76a23edc23b58f3ba5a515 \ No newline at end of file diff --git a/server/licenses/lucene-misc-9.10.0.jar.sha1 b/server/licenses/lucene-misc-9.10.0.jar.sha1 deleted file mode 100644 index 2d69a4cfa1148..0000000000000 --- a/server/licenses/lucene-misc-9.10.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -3621206c534d253a0205f8a0293c146ff34d8b03 \ No newline at end of file diff --git a/server/licenses/lucene-misc-9.11.0.jar.sha1 b/server/licenses/lucene-misc-9.11.0.jar.sha1 new file mode 100644 index 0000000000000..9be27f004435b --- /dev/null +++ b/server/licenses/lucene-misc-9.11.0.jar.sha1 @@ -0,0 +1 @@ +54fe308908194e1b0697a1157a45c5998c9e1083 \ No newline at end of file diff --git a/server/licenses/lucene-queries-9.10.0.jar.sha1 b/server/licenses/lucene-queries-9.10.0.jar.sha1 deleted file mode 100644 index d7c38977e4fc8..0000000000000 --- a/server/licenses/lucene-queries-9.10.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -bbe2360c60a43bf41fbf05d5f0b4f471547217ba \ No newline at end of file diff --git a/server/licenses/lucene-queries-9.11.0.jar.sha1 b/server/licenses/lucene-queries-9.11.0.jar.sha1 new file mode 100644 index 0000000000000..b445610c25858 --- /dev/null +++ b/server/licenses/lucene-queries-9.11.0.jar.sha1 @@ -0,0 +1 @@ +987d1286949ddf514b8405fd453ed47bebdfb12d \ No newline at end of file diff --git a/server/licenses/lucene-queryparser-9.10.0.jar.sha1 b/server/licenses/lucene-queryparser-9.10.0.jar.sha1 deleted file mode 100644 index b02a3cd926375..0000000000000 --- a/server/licenses/lucene-queryparser-9.10.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -c50f82d244ea5adac2d2d9295de85ddccc2d45cb \ No newline at end of file diff --git a/server/licenses/lucene-queryparser-9.11.0.jar.sha1 b/server/licenses/lucene-queryparser-9.11.0.jar.sha1 new file mode 100644 index 0000000000000..a1620ba9c7708 --- /dev/null +++ b/server/licenses/lucene-queryparser-9.11.0.jar.sha1 @@ -0,0 +1 @@ +e97fe1c0d102edb8d6e1c01454992fd2b8d80ae0 \ No newline at end of file diff --git a/server/licenses/lucene-sandbox-9.10.0.jar.sha1 b/server/licenses/lucene-sandbox-9.10.0.jar.sha1 deleted file mode 100644 index 74b9e925398b1..0000000000000 --- a/server/licenses/lucene-sandbox-9.10.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -80bc56b23b34cddab97557e5ada7cd0558dbf5e5 \ No newline at end of file diff --git a/server/licenses/lucene-sandbox-9.11.0.jar.sha1 b/server/licenses/lucene-sandbox-9.11.0.jar.sha1 new file mode 100644 index 0000000000000..0dc193f054973 --- /dev/null +++ b/server/licenses/lucene-sandbox-9.11.0.jar.sha1 @@ -0,0 +1 @@ +5e46b790744bd9118ccc053f70235364213312a5 \ No newline at end of file diff --git a/server/licenses/lucene-spatial-extras-9.10.0.jar.sha1 b/server/licenses/lucene-spatial-extras-9.10.0.jar.sha1 deleted file mode 100644 index 76e9fea920bb8..0000000000000 --- a/server/licenses/lucene-spatial-extras-9.10.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -055e6aa874b6ec9ddafc2e115055de1445c2df49 \ No newline at end of file diff --git a/server/licenses/lucene-spatial-extras-9.11.0.jar.sha1 b/server/licenses/lucene-spatial-extras-9.11.0.jar.sha1 new file mode 100644 index 0000000000000..9d3a8d2857db6 --- /dev/null +++ b/server/licenses/lucene-spatial-extras-9.11.0.jar.sha1 @@ -0,0 +1 @@ +079ca5aaf544a3acde84b8b88423ace6dedc23eb \ No newline at end of file diff --git a/server/licenses/lucene-spatial3d-9.10.0.jar.sha1 b/server/licenses/lucene-spatial3d-9.10.0.jar.sha1 deleted file mode 100644 index 3268b8bd557d0..0000000000000 --- a/server/licenses/lucene-spatial3d-9.10.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -06945a8b2a703062ce4b286ecceae7182b4f5f44 \ No newline at end of file diff --git a/server/licenses/lucene-spatial3d-9.11.0.jar.sha1 b/server/licenses/lucene-spatial3d-9.11.0.jar.sha1 new file mode 100644 index 0000000000000..fd5ff875a0113 --- /dev/null +++ b/server/licenses/lucene-spatial3d-9.11.0.jar.sha1 @@ -0,0 +1 @@ +564558818d70fc384db5b36fbc8a0ab27b107609 \ No newline at end of file diff --git a/server/licenses/lucene-suggest-9.10.0.jar.sha1 b/server/licenses/lucene-suggest-9.10.0.jar.sha1 deleted file mode 100644 index aaa10c449adb3..0000000000000 --- a/server/licenses/lucene-suggest-9.10.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -d2068ad997165a414927e8c0072d0b88741af069 \ No newline at end of file diff --git a/server/licenses/lucene-suggest-9.11.0.jar.sha1 b/server/licenses/lucene-suggest-9.11.0.jar.sha1 new file mode 100644 index 0000000000000..2fa96e97f307a --- /dev/null +++ b/server/licenses/lucene-suggest-9.11.0.jar.sha1 @@ -0,0 +1 @@ +aa345db9b6caaf881e7890ea5b8911357d592167 \ No newline at end of file diff --git a/server/src/main/java/org/apache/lucene/search/uhighlight/CustomFieldHighlighter.java b/server/src/main/java/org/apache/lucene/search/uhighlight/CustomFieldHighlighter.java index 477f1a7d2f9ba..dd28d5c28b1ca 100644 --- a/server/src/main/java/org/apache/lucene/search/uhighlight/CustomFieldHighlighter.java +++ b/server/src/main/java/org/apache/lucene/search/uhighlight/CustomFieldHighlighter.java @@ -51,6 +51,8 @@ class CustomFieldHighlighter extends FieldHighlighter { private static final Passage[] EMPTY_PASSAGE = new Passage[0]; + private static final Comparator DEFAULT_PASSAGE_SORT_COMPARATOR = Comparator.comparingInt(Passage::getStartOffset); + private final Locale breakIteratorLocale; private final int noMatchSize; private String fieldValue; @@ -66,7 +68,16 @@ class CustomFieldHighlighter extends FieldHighlighter { PassageFormatter passageFormatter, int noMatchSize ) { - super(field, fieldOffsetStrategy, breakIterator, passageScorer, maxPassages, maxNoHighlightPassages, passageFormatter); + super( + field, + fieldOffsetStrategy, + breakIterator, + passageScorer, + maxPassages, + maxNoHighlightPassages, + passageFormatter, + DEFAULT_PASSAGE_SORT_COMPARATOR + ); this.breakIteratorLocale = breakIteratorLocale; this.noMatchSize = noMatchSize; } diff --git a/server/src/main/java/org/opensearch/plugins/PluginsService.java b/server/src/main/java/org/opensearch/plugins/PluginsService.java index a6eefd2f4fd17..f08c9c738f1b4 100644 --- a/server/src/main/java/org/opensearch/plugins/PluginsService.java +++ b/server/src/main/java/org/opensearch/plugins/PluginsService.java @@ -36,6 +36,7 @@ import org.apache.logging.log4j.Logger; import org.apache.lucene.codecs.Codec; import org.apache.lucene.codecs.DocValuesFormat; +import org.apache.lucene.codecs.KnnVectorsFormat; import org.apache.lucene.codecs.PostingsFormat; import org.apache.lucene.util.SPIClassIterator; import org.opensearch.Build; @@ -762,6 +763,7 @@ static void reloadLuceneSPI(ClassLoader loader) { // Codecs: PostingsFormat.reloadPostingsFormats(loader); DocValuesFormat.reloadDocValuesFormats(loader); + KnnVectorsFormat.reloadKnnVectorsFormat(loader); Codec.reloadCodecs(loader); } diff --git a/server/src/main/java/org/opensearch/search/fetch/subphase/highlight/FastVectorHighlighter.java b/server/src/main/java/org/opensearch/search/fetch/subphase/highlight/FastVectorHighlighter.java index 69f86bb91cc6e..6ae90b0ef8434 100644 --- a/server/src/main/java/org/opensearch/search/fetch/subphase/highlight/FastVectorHighlighter.java +++ b/server/src/main/java/org/opensearch/search/fetch/subphase/highlight/FastVectorHighlighter.java @@ -304,7 +304,7 @@ private static BoundaryScanner getBoundaryScanner(Field field) { return DEFAULT_WORD_BOUNDARY_SCANNER; case CHARS: if (fieldOptions.boundaryMaxScan() != SimpleBoundaryScanner.DEFAULT_MAX_SCAN - || fieldOptions.boundaryChars() != SimpleBoundaryScanner.DEFAULT_BOUNDARY_CHARS) { + || fieldOptions.boundaryChars() != HighlightBuilder.DEFAULT_BOUNDARY_CHARS) { return new SimpleBoundaryScanner(fieldOptions.boundaryMaxScan(), fieldOptions.boundaryChars()); } return DEFAULT_SIMPLE_BOUNDARY_SCANNER; diff --git a/server/src/main/java/org/opensearch/search/fetch/subphase/highlight/HighlightBuilder.java b/server/src/main/java/org/opensearch/search/fetch/subphase/highlight/HighlightBuilder.java index 0e7c3cf30ccec..44ef3a90395b8 100644 --- a/server/src/main/java/org/opensearch/search/fetch/subphase/highlight/HighlightBuilder.java +++ b/server/src/main/java/org/opensearch/search/fetch/subphase/highlight/HighlightBuilder.java @@ -111,6 +111,8 @@ public class HighlightBuilder extends AbstractHighlighterBuilder" }; + static final Character[] DEFAULT_BOUNDARY_CHARS = HighlightBuilder.convertCharArray(SimpleBoundaryScanner.DEFAULT_BOUNDARY_CHARS); + /** * a {@link FieldOptions} with default settings */ @@ -124,7 +126,7 @@ public class HighlightBuilder extends AbstractHighlighterBuilder> KNOWN_CHARFILTERS = new MapBuilder>()