From 1c28e8b878084864432cbd67fb46904efefa337b Mon Sep 17 00:00:00 2001 From: Nhat Nguyen Date: Thu, 16 Sep 2021 15:04:36 -0400 Subject: [PATCH] Upgrade to Lucene-8.10.0-snapshot-bf2fcb53079 (#77898) To include LUCENE-10106 --- build-tools-internal/version.properties | 2 +- docs/Versions.asciidoc | 4 ++-- .../common/CommonAnalysisFactoryTests.java | 4 ++++ ...xpressions-8.10.0-snapshot-bf2fcb53079.jar.sha1 | 1 + .../licenses/lucene-expressions-8.9.0.jar.sha1 | 1 - .../index/reindex/ReindexValidator.java | 2 +- ...lyzers-icu-8.10.0-snapshot-bf2fcb53079.jar.sha1 | 1 + .../licenses/lucene-analyzers-icu-8.9.0.jar.sha1 | 1 - ...s-kuromoji-8.10.0-snapshot-bf2fcb53079.jar.sha1 | 1 + .../lucene-analyzers-kuromoji-8.9.0.jar.sha1 | 1 - ...yzers-nori-8.10.0-snapshot-bf2fcb53079.jar.sha1 | 1 + .../licenses/lucene-analyzers-nori-8.9.0.jar.sha1 | 1 - ...s-phonetic-8.10.0-snapshot-bf2fcb53079.jar.sha1 | 1 + .../lucene-analyzers-phonetic-8.9.0.jar.sha1 | 1 - ...rs-smartcn-8.10.0-snapshot-bf2fcb53079.jar.sha1 | 1 + .../lucene-analyzers-smartcn-8.9.0.jar.sha1 | 1 - ...rs-stempel-8.10.0-snapshot-bf2fcb53079.jar.sha1 | 1 + .../lucene-analyzers-stempel-8.9.0.jar.sha1 | 1 - ...morfologik-8.10.0-snapshot-bf2fcb53079.jar.sha1 | 1 + .../lucene-analyzers-morfologik-8.9.0.jar.sha1 | 1 - ...ers-common-8.10.0-snapshot-bf2fcb53079.jar.sha1 | 1 + .../lucene-analyzers-common-8.9.0.jar.sha1 | 1 - ...ard-codecs-8.10.0-snapshot-bf2fcb53079.jar.sha1 | 1 + .../licenses/lucene-backward-codecs-8.9.0.jar.sha1 | 1 - ...ucene-core-8.10.0-snapshot-bf2fcb53079.jar.sha1 | 1 + server/licenses/lucene-core-8.9.0.jar.sha1 | 1 - ...e-grouping-8.10.0-snapshot-bf2fcb53079.jar.sha1 | 1 + server/licenses/lucene-grouping-8.9.0.jar.sha1 | 1 - ...ighlighter-8.10.0-snapshot-bf2fcb53079.jar.sha1 | 1 + server/licenses/lucene-highlighter-8.9.0.jar.sha1 | 1 - ...ucene-join-8.10.0-snapshot-bf2fcb53079.jar.sha1 | 1 + server/licenses/lucene-join-8.9.0.jar.sha1 | 1 - ...ene-memory-8.10.0-snapshot-bf2fcb53079.jar.sha1 | 1 + server/licenses/lucene-memory-8.9.0.jar.sha1 | 1 - ...ucene-misc-8.10.0-snapshot-bf2fcb53079.jar.sha1 | 1 + server/licenses/lucene-misc-8.9.0.jar.sha1 | 1 - ...ne-queries-8.10.0-snapshot-bf2fcb53079.jar.sha1 | 1 + server/licenses/lucene-queries-8.9.0.jar.sha1 | 1 - ...ueryparser-8.10.0-snapshot-bf2fcb53079.jar.sha1 | 1 + server/licenses/lucene-queryparser-8.9.0.jar.sha1 | 1 - ...ne-sandbox-8.10.0-snapshot-bf2fcb53079.jar.sha1 | 1 + server/licenses/lucene-sandbox-8.9.0.jar.sha1 | 1 - ...ial-extras-8.10.0-snapshot-bf2fcb53079.jar.sha1 | 1 + .../licenses/lucene-spatial-extras-8.9.0.jar.sha1 | 1 - ...-spatial3d-8.10.0-snapshot-bf2fcb53079.jar.sha1 | 1 + server/licenses/lucene-spatial3d-8.9.0.jar.sha1 | 1 - ...ne-suggest-8.10.0-snapshot-bf2fcb53079.jar.sha1 | 1 + server/licenses/lucene-suggest-8.9.0.jar.sha1 | 1 - .../src/main/java/org/elasticsearch/Version.java | 2 +- .../index/query/QueryStringQueryBuilder.java | 4 ++-- .../index/query/RegexpQueryBuilder.java | 2 +- .../index/search/QueryStringQueryParser.java | 2 +- .../aggregations/bucket/terms/IncludeExclude.java | 2 +- .../search/suggest/completion/FuzzyOptions.java | 2 +- .../search/suggest/completion/RegexOptions.java | 2 +- .../AbstractNonTextScriptFieldTypeTestCase.java | 2 +- .../index/mapper/CompletionFieldMapperTests.java | 4 ++-- .../index/mapper/KeywordScriptFieldTypeTests.java | 2 +- .../index/query/QueryStringQueryBuilderTests.java | 6 +++--- .../search/fetch/subphase/FieldFetcherTests.java | 7 +++---- .../runtime/StringScriptFieldRegexpQueryTests.java | 12 ++++++------ .../indices/analysis/AnalysisFactoryTestCase.java | 2 ++ .../authz/permission/FieldPermissions.java | 4 ++-- .../xpack/core/security/support/Automatons.java | 4 ++-- .../accesscontrol/FieldSubsetReaderTests.java | 8 ++++---- .../core/security/support/AutomatonsTests.java | 14 +++++++------- .../ql/expression/predicate/regex/LikePattern.java | 2 +- .../security/authz/store/FileRolesStoreTests.java | 2 +- ...ucene-core-8.10.0-snapshot-bf2fcb53079.jar.sha1 | 1 + .../sql-action/licenses/lucene-core-8.9.0.jar.sha1 | 1 - .../xpack/watcher/common/http/HttpClient.java | 2 +- 71 files changed, 75 insertions(+), 70 deletions(-) create mode 100644 modules/lang-expression/licenses/lucene-expressions-8.10.0-snapshot-bf2fcb53079.jar.sha1 delete mode 100644 modules/lang-expression/licenses/lucene-expressions-8.9.0.jar.sha1 create mode 100644 plugins/analysis-icu/licenses/lucene-analyzers-icu-8.10.0-snapshot-bf2fcb53079.jar.sha1 delete mode 100644 plugins/analysis-icu/licenses/lucene-analyzers-icu-8.9.0.jar.sha1 create mode 100644 plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-8.10.0-snapshot-bf2fcb53079.jar.sha1 delete mode 100644 plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-8.9.0.jar.sha1 create mode 100644 plugins/analysis-nori/licenses/lucene-analyzers-nori-8.10.0-snapshot-bf2fcb53079.jar.sha1 delete mode 100644 plugins/analysis-nori/licenses/lucene-analyzers-nori-8.9.0.jar.sha1 create mode 100644 plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-8.10.0-snapshot-bf2fcb53079.jar.sha1 delete mode 100644 plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-8.9.0.jar.sha1 create mode 100644 plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-8.10.0-snapshot-bf2fcb53079.jar.sha1 delete mode 100644 plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-8.9.0.jar.sha1 create mode 100644 plugins/analysis-stempel/licenses/lucene-analyzers-stempel-8.10.0-snapshot-bf2fcb53079.jar.sha1 delete mode 100644 plugins/analysis-stempel/licenses/lucene-analyzers-stempel-8.9.0.jar.sha1 create mode 100644 plugins/analysis-ukrainian/licenses/lucene-analyzers-morfologik-8.10.0-snapshot-bf2fcb53079.jar.sha1 delete mode 100644 plugins/analysis-ukrainian/licenses/lucene-analyzers-morfologik-8.9.0.jar.sha1 create mode 100644 server/licenses/lucene-analyzers-common-8.10.0-snapshot-bf2fcb53079.jar.sha1 delete mode 100644 server/licenses/lucene-analyzers-common-8.9.0.jar.sha1 create mode 100644 server/licenses/lucene-backward-codecs-8.10.0-snapshot-bf2fcb53079.jar.sha1 delete mode 100644 server/licenses/lucene-backward-codecs-8.9.0.jar.sha1 create mode 100644 server/licenses/lucene-core-8.10.0-snapshot-bf2fcb53079.jar.sha1 delete mode 100644 server/licenses/lucene-core-8.9.0.jar.sha1 create mode 100644 server/licenses/lucene-grouping-8.10.0-snapshot-bf2fcb53079.jar.sha1 delete mode 100644 server/licenses/lucene-grouping-8.9.0.jar.sha1 create mode 100644 server/licenses/lucene-highlighter-8.10.0-snapshot-bf2fcb53079.jar.sha1 delete mode 100644 server/licenses/lucene-highlighter-8.9.0.jar.sha1 create mode 100644 server/licenses/lucene-join-8.10.0-snapshot-bf2fcb53079.jar.sha1 delete mode 100644 server/licenses/lucene-join-8.9.0.jar.sha1 create mode 100644 server/licenses/lucene-memory-8.10.0-snapshot-bf2fcb53079.jar.sha1 delete mode 100644 server/licenses/lucene-memory-8.9.0.jar.sha1 create mode 100644 server/licenses/lucene-misc-8.10.0-snapshot-bf2fcb53079.jar.sha1 delete mode 100644 server/licenses/lucene-misc-8.9.0.jar.sha1 create mode 100644 server/licenses/lucene-queries-8.10.0-snapshot-bf2fcb53079.jar.sha1 delete mode 100644 server/licenses/lucene-queries-8.9.0.jar.sha1 create mode 100644 server/licenses/lucene-queryparser-8.10.0-snapshot-bf2fcb53079.jar.sha1 delete mode 100644 server/licenses/lucene-queryparser-8.9.0.jar.sha1 create mode 100644 server/licenses/lucene-sandbox-8.10.0-snapshot-bf2fcb53079.jar.sha1 delete mode 100644 server/licenses/lucene-sandbox-8.9.0.jar.sha1 create mode 100644 server/licenses/lucene-spatial-extras-8.10.0-snapshot-bf2fcb53079.jar.sha1 delete mode 100644 server/licenses/lucene-spatial-extras-8.9.0.jar.sha1 create mode 100644 server/licenses/lucene-spatial3d-8.10.0-snapshot-bf2fcb53079.jar.sha1 delete mode 100644 server/licenses/lucene-spatial3d-8.9.0.jar.sha1 create mode 100644 server/licenses/lucene-suggest-8.10.0-snapshot-bf2fcb53079.jar.sha1 delete mode 100644 server/licenses/lucene-suggest-8.9.0.jar.sha1 create mode 100644 x-pack/plugin/sql/sql-action/licenses/lucene-core-8.10.0-snapshot-bf2fcb53079.jar.sha1 delete mode 100644 x-pack/plugin/sql/sql-action/licenses/lucene-core-8.9.0.jar.sha1 diff --git a/build-tools-internal/version.properties b/build-tools-internal/version.properties index 8b2390cece62b..30c4c369251b5 100644 --- a/build-tools-internal/version.properties +++ b/build-tools-internal/version.properties @@ -1,5 +1,5 @@ elasticsearch = 7.16.0 -lucene = 8.9.0 +lucene = 8.10.0-snapshot-bf2fcb53079 bundled_jdk_vendor = adoptium bundled_jdk = 16.0.2+7 diff --git a/docs/Versions.asciidoc b/docs/Versions.asciidoc index 20f3588de8626..bbbc2661506d9 100644 --- a/docs/Versions.asciidoc +++ b/docs/Versions.asciidoc @@ -1,8 +1,8 @@ include::{docs-root}/shared/versions/stack/{source_branch}.asciidoc[] -:lucene_version: 8.9.0 -:lucene_version_path: 8_9_0 +:lucene_version: 8.10.0 +:lucene_version_path: 8_10_0 :jdk: 1.8.0_131 :jdk_major: 8 :build_flavor: default diff --git a/modules/analysis-common/src/test/java/org/elasticsearch/analysis/common/CommonAnalysisFactoryTests.java b/modules/analysis-common/src/test/java/org/elasticsearch/analysis/common/CommonAnalysisFactoryTests.java index f723fde84487f..9857cf9685835 100644 --- a/modules/analysis-common/src/test/java/org/elasticsearch/analysis/common/CommonAnalysisFactoryTests.java +++ b/modules/analysis-common/src/test/java/org/elasticsearch/analysis/common/CommonAnalysisFactoryTests.java @@ -13,6 +13,8 @@ import org.apache.lucene.analysis.miscellaneous.LimitTokenCountFilterFactory; import org.apache.lucene.analysis.reverse.ReverseStringFilterFactory; import org.apache.lucene.analysis.snowball.SnowballPorterFilterFactory; +import org.apache.lucene.analysis.te.TeluguNormalizationFilterFactory; +import org.apache.lucene.analysis.te.TeluguStemFilterFactory; import org.elasticsearch.indices.analysis.AnalysisFactoryTestCase; import java.util.List; @@ -129,6 +131,8 @@ protected Map> getTokenFilters() { filters.put("brazilianstem", BrazilianStemTokenFilterFactory.class); filters.put("czechstem", CzechStemTokenFilterFactory.class); filters.put("germanstem", GermanStemTokenFilterFactory.class); + filters.put("telugunormalization", TeluguNormalizationFilterFactory.class); + filters.put("telugustem", TeluguStemFilterFactory.class); // this filter is not exposed and should only be used internally filters.put("fixedshingle", Void.class); return filters; diff --git a/modules/lang-expression/licenses/lucene-expressions-8.10.0-snapshot-bf2fcb53079.jar.sha1 b/modules/lang-expression/licenses/lucene-expressions-8.10.0-snapshot-bf2fcb53079.jar.sha1 new file mode 100644 index 0000000000000..0e051c6381995 --- /dev/null +++ b/modules/lang-expression/licenses/lucene-expressions-8.10.0-snapshot-bf2fcb53079.jar.sha1 @@ -0,0 +1 @@ +97f27306f1817475b30e52f48b1407bc5d696d59 \ No newline at end of file diff --git a/modules/lang-expression/licenses/lucene-expressions-8.9.0.jar.sha1 b/modules/lang-expression/licenses/lucene-expressions-8.9.0.jar.sha1 deleted file mode 100644 index ae69d7ff51221..0000000000000 --- a/modules/lang-expression/licenses/lucene-expressions-8.9.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -c52e0f197d8f37fec8e679660a4814b8928e4db2 \ No newline at end of file diff --git a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/ReindexValidator.java b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/ReindexValidator.java index 4319e75fee761..adb10be5f2669 100644 --- a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/ReindexValidator.java +++ b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/ReindexValidator.java @@ -81,7 +81,7 @@ static CharacterRunAutomaton buildRemoteWhitelist(List whitelist) { return new CharacterRunAutomaton(Automata.makeEmpty()); } Automaton automaton = Regex.simpleMatchToAutomaton(whitelist.toArray(Strings.EMPTY_ARRAY)); - automaton = MinimizationOperations.minimize(automaton, Operations.DEFAULT_MAX_DETERMINIZED_STATES); + automaton = MinimizationOperations.minimize(automaton, Operations.DEFAULT_DETERMINIZE_WORK_LIMIT); if (Operations.isTotal(automaton)) { throw new IllegalArgumentException("Refusing to start because whitelist " + whitelist + " accepts all addresses. " + "This would allow users to reindex-from-remote any URL they like effectively having Elasticsearch make HTTP GETs " diff --git a/plugins/analysis-icu/licenses/lucene-analyzers-icu-8.10.0-snapshot-bf2fcb53079.jar.sha1 b/plugins/analysis-icu/licenses/lucene-analyzers-icu-8.10.0-snapshot-bf2fcb53079.jar.sha1 new file mode 100644 index 0000000000000..dad0264f8c937 --- /dev/null +++ b/plugins/analysis-icu/licenses/lucene-analyzers-icu-8.10.0-snapshot-bf2fcb53079.jar.sha1 @@ -0,0 +1 @@ +97560884369643ba928b7e683e092699330c4f5b \ No newline at end of file diff --git a/plugins/analysis-icu/licenses/lucene-analyzers-icu-8.9.0.jar.sha1 b/plugins/analysis-icu/licenses/lucene-analyzers-icu-8.9.0.jar.sha1 deleted file mode 100644 index 8862b76301215..0000000000000 --- a/plugins/analysis-icu/licenses/lucene-analyzers-icu-8.9.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -390ebbb1cdb3ab1e8e5286ae4d77d336fd3895ba \ No newline at end of file diff --git a/plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-8.10.0-snapshot-bf2fcb53079.jar.sha1 b/plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-8.10.0-snapshot-bf2fcb53079.jar.sha1 new file mode 100644 index 0000000000000..df913d91535b4 --- /dev/null +++ b/plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-8.10.0-snapshot-bf2fcb53079.jar.sha1 @@ -0,0 +1 @@ +3bc69fe29001399cfc98ddbd9f1d27864fa6a4a1 \ No newline at end of file diff --git a/plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-8.9.0.jar.sha1 b/plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-8.9.0.jar.sha1 deleted file mode 100644 index 1b60c193938a9..0000000000000 --- a/plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-8.9.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -d7553997ad55671bb8c4c023f607f71463da4d0f \ No newline at end of file diff --git a/plugins/analysis-nori/licenses/lucene-analyzers-nori-8.10.0-snapshot-bf2fcb53079.jar.sha1 b/plugins/analysis-nori/licenses/lucene-analyzers-nori-8.10.0-snapshot-bf2fcb53079.jar.sha1 new file mode 100644 index 0000000000000..ec341f6b95ed8 --- /dev/null +++ b/plugins/analysis-nori/licenses/lucene-analyzers-nori-8.10.0-snapshot-bf2fcb53079.jar.sha1 @@ -0,0 +1 @@ +497cdb3e2b5dd63d735cd60140f7c18533f3c401 \ No newline at end of file diff --git a/plugins/analysis-nori/licenses/lucene-analyzers-nori-8.9.0.jar.sha1 b/plugins/analysis-nori/licenses/lucene-analyzers-nori-8.9.0.jar.sha1 deleted file mode 100644 index b9ea18c6de216..0000000000000 --- a/plugins/analysis-nori/licenses/lucene-analyzers-nori-8.9.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -99ae12d053d27e2b8d78d084e1bf1c893b896554 \ No newline at end of file diff --git a/plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-8.10.0-snapshot-bf2fcb53079.jar.sha1 b/plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-8.10.0-snapshot-bf2fcb53079.jar.sha1 new file mode 100644 index 0000000000000..90e9a1b66cfc0 --- /dev/null +++ b/plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-8.10.0-snapshot-bf2fcb53079.jar.sha1 @@ -0,0 +1 @@ +4fa14c42bf5864d28a7abfe197e79cf89b195c1b \ No newline at end of file diff --git a/plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-8.9.0.jar.sha1 b/plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-8.9.0.jar.sha1 deleted file mode 100644 index 19d4411ac82f5..0000000000000 --- a/plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-8.9.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -144cbfb8c5a66ae9ac7abddb8855974599d1ea67 \ No newline at end of file diff --git a/plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-8.10.0-snapshot-bf2fcb53079.jar.sha1 b/plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-8.10.0-snapshot-bf2fcb53079.jar.sha1 new file mode 100644 index 0000000000000..4ebf1040e67b1 --- /dev/null +++ b/plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-8.10.0-snapshot-bf2fcb53079.jar.sha1 @@ -0,0 +1 @@ +18971c579487a7c55a65b055fec07d9286ed49ce \ No newline at end of file diff --git a/plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-8.9.0.jar.sha1 b/plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-8.9.0.jar.sha1 deleted file mode 100644 index 81834aaa9b9e6..0000000000000 --- a/plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-8.9.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -35f24955ae3d079a262a3aa7ac2ca2449c6d10ee \ No newline at end of file diff --git a/plugins/analysis-stempel/licenses/lucene-analyzers-stempel-8.10.0-snapshot-bf2fcb53079.jar.sha1 b/plugins/analysis-stempel/licenses/lucene-analyzers-stempel-8.10.0-snapshot-bf2fcb53079.jar.sha1 new file mode 100644 index 0000000000000..1476b72761e58 --- /dev/null +++ b/plugins/analysis-stempel/licenses/lucene-analyzers-stempel-8.10.0-snapshot-bf2fcb53079.jar.sha1 @@ -0,0 +1 @@ +6fcf11017c3bce6e33d5cda04e3ef49560baa2a2 \ No newline at end of file diff --git a/plugins/analysis-stempel/licenses/lucene-analyzers-stempel-8.9.0.jar.sha1 b/plugins/analysis-stempel/licenses/lucene-analyzers-stempel-8.9.0.jar.sha1 deleted file mode 100644 index ff6375c1634ab..0000000000000 --- a/plugins/analysis-stempel/licenses/lucene-analyzers-stempel-8.9.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -d2a6fb6327e54c4eccfaa0f8e74953cd69a31e07 \ No newline at end of file diff --git a/plugins/analysis-ukrainian/licenses/lucene-analyzers-morfologik-8.10.0-snapshot-bf2fcb53079.jar.sha1 b/plugins/analysis-ukrainian/licenses/lucene-analyzers-morfologik-8.10.0-snapshot-bf2fcb53079.jar.sha1 new file mode 100644 index 0000000000000..f5ac5de21f228 --- /dev/null +++ b/plugins/analysis-ukrainian/licenses/lucene-analyzers-morfologik-8.10.0-snapshot-bf2fcb53079.jar.sha1 @@ -0,0 +1 @@ +af5750b21d1d38352b49561c63b039723911a0d4 \ No newline at end of file diff --git a/plugins/analysis-ukrainian/licenses/lucene-analyzers-morfologik-8.9.0.jar.sha1 b/plugins/analysis-ukrainian/licenses/lucene-analyzers-morfologik-8.9.0.jar.sha1 deleted file mode 100644 index f901aa40fa5a2..0000000000000 --- a/plugins/analysis-ukrainian/licenses/lucene-analyzers-morfologik-8.9.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -37fd6e23bbb1c146c729bb32b6c043ed0642a73e \ No newline at end of file diff --git a/server/licenses/lucene-analyzers-common-8.10.0-snapshot-bf2fcb53079.jar.sha1 b/server/licenses/lucene-analyzers-common-8.10.0-snapshot-bf2fcb53079.jar.sha1 new file mode 100644 index 0000000000000..fdede7b9c4cdc --- /dev/null +++ b/server/licenses/lucene-analyzers-common-8.10.0-snapshot-bf2fcb53079.jar.sha1 @@ -0,0 +1 @@ +eb63f6ecd58a7e27a02b533b9c1e6cdb68f506fc \ No newline at end of file diff --git a/server/licenses/lucene-analyzers-common-8.9.0.jar.sha1 b/server/licenses/lucene-analyzers-common-8.9.0.jar.sha1 deleted file mode 100644 index 8cd5ba872a31d..0000000000000 --- a/server/licenses/lucene-analyzers-common-8.9.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -18f3bbff2b7672ea0b9cc18c8110ef69c763ae6b \ No newline at end of file diff --git a/server/licenses/lucene-backward-codecs-8.10.0-snapshot-bf2fcb53079.jar.sha1 b/server/licenses/lucene-backward-codecs-8.10.0-snapshot-bf2fcb53079.jar.sha1 new file mode 100644 index 0000000000000..d7b5d232b1d5b --- /dev/null +++ b/server/licenses/lucene-backward-codecs-8.10.0-snapshot-bf2fcb53079.jar.sha1 @@ -0,0 +1 @@ +2482a84e5e26a3eaf0bd7c5a77efc60435c7f688 \ No newline at end of file diff --git a/server/licenses/lucene-backward-codecs-8.9.0.jar.sha1 b/server/licenses/lucene-backward-codecs-8.9.0.jar.sha1 deleted file mode 100644 index 932c95dc8cfcb..0000000000000 --- a/server/licenses/lucene-backward-codecs-8.9.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -fec88b5e71c699ceddc3ae0369481697ac9a5c96 \ No newline at end of file diff --git a/server/licenses/lucene-core-8.10.0-snapshot-bf2fcb53079.jar.sha1 b/server/licenses/lucene-core-8.10.0-snapshot-bf2fcb53079.jar.sha1 new file mode 100644 index 0000000000000..2a546f6674e06 --- /dev/null +++ b/server/licenses/lucene-core-8.10.0-snapshot-bf2fcb53079.jar.sha1 @@ -0,0 +1 @@ +f33b45dbbce59e727e5a82dddab48c8c7681e25b \ No newline at end of file diff --git a/server/licenses/lucene-core-8.9.0.jar.sha1 b/server/licenses/lucene-core-8.9.0.jar.sha1 deleted file mode 100644 index 859cdb2013408..0000000000000 --- a/server/licenses/lucene-core-8.9.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -5c3f72357089f7f0c1ef44bbe7b4c67b6149a5af \ No newline at end of file diff --git a/server/licenses/lucene-grouping-8.10.0-snapshot-bf2fcb53079.jar.sha1 b/server/licenses/lucene-grouping-8.10.0-snapshot-bf2fcb53079.jar.sha1 new file mode 100644 index 0000000000000..c39c757ef5945 --- /dev/null +++ b/server/licenses/lucene-grouping-8.10.0-snapshot-bf2fcb53079.jar.sha1 @@ -0,0 +1 @@ +4020eb4e53d759fa11819b8d6b6a49422f51abe8 \ No newline at end of file diff --git a/server/licenses/lucene-grouping-8.9.0.jar.sha1 b/server/licenses/lucene-grouping-8.9.0.jar.sha1 deleted file mode 100644 index e28e73fb699bf..0000000000000 --- a/server/licenses/lucene-grouping-8.9.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -9440fdd430b1c2dadbf3bc72656848d61e6f747f \ No newline at end of file diff --git a/server/licenses/lucene-highlighter-8.10.0-snapshot-bf2fcb53079.jar.sha1 b/server/licenses/lucene-highlighter-8.10.0-snapshot-bf2fcb53079.jar.sha1 new file mode 100644 index 0000000000000..eda61949a36fd --- /dev/null +++ b/server/licenses/lucene-highlighter-8.10.0-snapshot-bf2fcb53079.jar.sha1 @@ -0,0 +1 @@ +b2c9682be68699860aeeb9b048665ab6cf259c7c \ No newline at end of file diff --git a/server/licenses/lucene-highlighter-8.9.0.jar.sha1 b/server/licenses/lucene-highlighter-8.9.0.jar.sha1 deleted file mode 100644 index 111b023f9502c..0000000000000 --- a/server/licenses/lucene-highlighter-8.9.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -94e80bdeab170b0ce1b36a32b6a790d23d7f6d7b \ No newline at end of file diff --git a/server/licenses/lucene-join-8.10.0-snapshot-bf2fcb53079.jar.sha1 b/server/licenses/lucene-join-8.10.0-snapshot-bf2fcb53079.jar.sha1 new file mode 100644 index 0000000000000..60e4cb4bed007 --- /dev/null +++ b/server/licenses/lucene-join-8.10.0-snapshot-bf2fcb53079.jar.sha1 @@ -0,0 +1 @@ +be4f561159763de6a28d47b463438331a96c31c9 \ No newline at end of file diff --git a/server/licenses/lucene-join-8.9.0.jar.sha1 b/server/licenses/lucene-join-8.9.0.jar.sha1 deleted file mode 100644 index 9b8322851dfec..0000000000000 --- a/server/licenses/lucene-join-8.9.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -5ae97803efd3344597f6b6bdf823b18d130e8851 \ No newline at end of file diff --git a/server/licenses/lucene-memory-8.10.0-snapshot-bf2fcb53079.jar.sha1 b/server/licenses/lucene-memory-8.10.0-snapshot-bf2fcb53079.jar.sha1 new file mode 100644 index 0000000000000..0cb9423697434 --- /dev/null +++ b/server/licenses/lucene-memory-8.10.0-snapshot-bf2fcb53079.jar.sha1 @@ -0,0 +1 @@ +8fc0745c4a589cdfbd56d156236fd91dbab0dacb \ No newline at end of file diff --git a/server/licenses/lucene-memory-8.9.0.jar.sha1 b/server/licenses/lucene-memory-8.9.0.jar.sha1 deleted file mode 100644 index bd7fbba668fc4..0000000000000 --- a/server/licenses/lucene-memory-8.9.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -09423a6dca2a9ba665e644d86a713d9a6b2b0d3f \ No newline at end of file diff --git a/server/licenses/lucene-misc-8.10.0-snapshot-bf2fcb53079.jar.sha1 b/server/licenses/lucene-misc-8.10.0-snapshot-bf2fcb53079.jar.sha1 new file mode 100644 index 0000000000000..4860f9a1e54ea --- /dev/null +++ b/server/licenses/lucene-misc-8.10.0-snapshot-bf2fcb53079.jar.sha1 @@ -0,0 +1 @@ +7089f903268271acf6eb668918ac51f0cba15213 \ No newline at end of file diff --git a/server/licenses/lucene-misc-8.9.0.jar.sha1 b/server/licenses/lucene-misc-8.9.0.jar.sha1 deleted file mode 100644 index dd4e7baeb3c53..0000000000000 --- a/server/licenses/lucene-misc-8.9.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -067494d621ba2ef1f2e4da3ef167106f00b52051 \ No newline at end of file diff --git a/server/licenses/lucene-queries-8.10.0-snapshot-bf2fcb53079.jar.sha1 b/server/licenses/lucene-queries-8.10.0-snapshot-bf2fcb53079.jar.sha1 new file mode 100644 index 0000000000000..0f6f657b0747b --- /dev/null +++ b/server/licenses/lucene-queries-8.10.0-snapshot-bf2fcb53079.jar.sha1 @@ -0,0 +1 @@ +35a4945ac05c2aeb0c9e244098827fd7aeea1858 \ No newline at end of file diff --git a/server/licenses/lucene-queries-8.9.0.jar.sha1 b/server/licenses/lucene-queries-8.9.0.jar.sha1 deleted file mode 100644 index 682553f877600..0000000000000 --- a/server/licenses/lucene-queries-8.9.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -c6bda4622abf240da6567a128242f46708fa6c00 \ No newline at end of file diff --git a/server/licenses/lucene-queryparser-8.10.0-snapshot-bf2fcb53079.jar.sha1 b/server/licenses/lucene-queryparser-8.10.0-snapshot-bf2fcb53079.jar.sha1 new file mode 100644 index 0000000000000..48ccf9f681ce5 --- /dev/null +++ b/server/licenses/lucene-queryparser-8.10.0-snapshot-bf2fcb53079.jar.sha1 @@ -0,0 +1 @@ +3d0929b7a5a2ba7f83d0357553f240f6d8362446 \ No newline at end of file diff --git a/server/licenses/lucene-queryparser-8.9.0.jar.sha1 b/server/licenses/lucene-queryparser-8.9.0.jar.sha1 deleted file mode 100644 index d1978b318fd67..0000000000000 --- a/server/licenses/lucene-queryparser-8.9.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -95a9d8cf8ca8eaf9f241fd323697d26d211721b2 \ No newline at end of file diff --git a/server/licenses/lucene-sandbox-8.10.0-snapshot-bf2fcb53079.jar.sha1 b/server/licenses/lucene-sandbox-8.10.0-snapshot-bf2fcb53079.jar.sha1 new file mode 100644 index 0000000000000..062d28281a90a --- /dev/null +++ b/server/licenses/lucene-sandbox-8.10.0-snapshot-bf2fcb53079.jar.sha1 @@ -0,0 +1 @@ +d1d6696a4857bb580f6fc4a93bd3307effddd736 \ No newline at end of file diff --git a/server/licenses/lucene-sandbox-8.9.0.jar.sha1 b/server/licenses/lucene-sandbox-8.9.0.jar.sha1 deleted file mode 100644 index 9e0539ea7ae5d..0000000000000 --- a/server/licenses/lucene-sandbox-8.9.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -af9f6c0287465e17a520b93b684474712433b293 \ No newline at end of file diff --git a/server/licenses/lucene-spatial-extras-8.10.0-snapshot-bf2fcb53079.jar.sha1 b/server/licenses/lucene-spatial-extras-8.10.0-snapshot-bf2fcb53079.jar.sha1 new file mode 100644 index 0000000000000..f7c69cd9622e3 --- /dev/null +++ b/server/licenses/lucene-spatial-extras-8.10.0-snapshot-bf2fcb53079.jar.sha1 @@ -0,0 +1 @@ +bc52ac3d5fed41fde8b7ad95c7d5ce703b90377f \ No newline at end of file diff --git a/server/licenses/lucene-spatial-extras-8.9.0.jar.sha1 b/server/licenses/lucene-spatial-extras-8.9.0.jar.sha1 deleted file mode 100644 index cedc910adb51b..0000000000000 --- a/server/licenses/lucene-spatial-extras-8.9.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -c89f4e78712806e8d5bb4adfb21cf0722ad3f175 \ No newline at end of file diff --git a/server/licenses/lucene-spatial3d-8.10.0-snapshot-bf2fcb53079.jar.sha1 b/server/licenses/lucene-spatial3d-8.10.0-snapshot-bf2fcb53079.jar.sha1 new file mode 100644 index 0000000000000..bacaf78b1aec2 --- /dev/null +++ b/server/licenses/lucene-spatial3d-8.10.0-snapshot-bf2fcb53079.jar.sha1 @@ -0,0 +1 @@ +57d8cc36815cf45eb16d43648c8d2a5b251b4e62 \ No newline at end of file diff --git a/server/licenses/lucene-spatial3d-8.9.0.jar.sha1 b/server/licenses/lucene-spatial3d-8.9.0.jar.sha1 deleted file mode 100644 index f0c08e6e6bd29..0000000000000 --- a/server/licenses/lucene-spatial3d-8.9.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -0d1238c4e8bf4409b3bb3fbddf2e977b0f19b24b \ No newline at end of file diff --git a/server/licenses/lucene-suggest-8.10.0-snapshot-bf2fcb53079.jar.sha1 b/server/licenses/lucene-suggest-8.10.0-snapshot-bf2fcb53079.jar.sha1 new file mode 100644 index 0000000000000..90ade912a8369 --- /dev/null +++ b/server/licenses/lucene-suggest-8.10.0-snapshot-bf2fcb53079.jar.sha1 @@ -0,0 +1 @@ +17e5a74d57ecb861e93c3cfbf4feb356a0571bbf \ No newline at end of file diff --git a/server/licenses/lucene-suggest-8.9.0.jar.sha1 b/server/licenses/lucene-suggest-8.9.0.jar.sha1 deleted file mode 100644 index f6f8bb83d66ae..0000000000000 --- a/server/licenses/lucene-suggest-8.9.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -98cb69950b48b829b6605a003c99aa7eb86fa9eb \ No newline at end of file diff --git a/server/src/main/java/org/elasticsearch/Version.java b/server/src/main/java/org/elasticsearch/Version.java index 5e6aca77135de..d932c54803de8 100644 --- a/server/src/main/java/org/elasticsearch/Version.java +++ b/server/src/main/java/org/elasticsearch/Version.java @@ -157,7 +157,7 @@ public class Version implements Comparable, ToXContentFragment { public static final Version V_7_14_1 = new Version(7140199, org.apache.lucene.util.Version.LUCENE_8_9_0); public static final Version V_7_14_2 = new Version(7140299, org.apache.lucene.util.Version.LUCENE_8_9_0); public static final Version V_7_15_0 = new Version(7150099, org.apache.lucene.util.Version.LUCENE_8_9_0); - public static final Version V_7_16_0 = new Version(7160099, org.apache.lucene.util.Version.LUCENE_8_9_0); + public static final Version V_7_16_0 = new Version(7160099, org.apache.lucene.util.Version.LUCENE_8_10_0); public static final Version CURRENT = V_7_16_0; private static final ImmutableOpenIntMap idToVersion; diff --git a/server/src/main/java/org/elasticsearch/index/query/QueryStringQueryBuilder.java b/server/src/main/java/org/elasticsearch/index/query/QueryStringQueryBuilder.java index 5926b6338716f..e1919f0463c47 100644 --- a/server/src/main/java/org/elasticsearch/index/query/QueryStringQueryBuilder.java +++ b/server/src/main/java/org/elasticsearch/index/query/QueryStringQueryBuilder.java @@ -48,7 +48,7 @@ public class QueryStringQueryBuilder extends AbstractQueryBuilder public static final String NAME = "regexp"; public static final int DEFAULT_FLAGS_VALUE = RegexpFlag.ALL.value(); - public static final int DEFAULT_MAX_DETERMINIZED_STATES = Operations.DEFAULT_MAX_DETERMINIZED_STATES; + public static final int DEFAULT_MAX_DETERMINIZED_STATES = Operations.DEFAULT_DETERMINIZE_WORK_LIMIT; public static final boolean DEFAULT_CASE_INSENSITIVITY = false; private static final ParseField FLAGS_VALUE_FIELD = new ParseField("flags_value"); diff --git a/server/src/main/java/org/elasticsearch/index/search/QueryStringQueryParser.java b/server/src/main/java/org/elasticsearch/index/search/QueryStringQueryParser.java index 4e53c3f697ed9..28594a3a6655e 100644 --- a/server/src/main/java/org/elasticsearch/index/search/QueryStringQueryParser.java +++ b/server/src/main/java/org/elasticsearch/index/search/QueryStringQueryParser.java @@ -731,7 +731,7 @@ private Query getRegexpQuerySingle(String field, String termStr) throws ParseExc setAnalyzer(forceAnalyzer); return super.getRegexpQuery(field, termStr); } - return currentFieldType.regexpQuery(termStr, RegExp.ALL, 0, getMaxDeterminizedStates(), + return currentFieldType.regexpQuery(termStr, RegExp.ALL, 0, getDeterminizeWorkLimit(), getMultiTermRewriteMethod(), context); } catch (RuntimeException e) { if (lenient) { diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/IncludeExclude.java b/server/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/IncludeExclude.java index 68bd88b0e98c2..035f58b8a8777 100644 --- a/server/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/IncludeExclude.java +++ b/server/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/IncludeExclude.java @@ -576,7 +576,7 @@ private Automaton toAutomaton() { a = Automata.makeAnyString(); } if (exclude != null) { - a = Operations.minus(a, exclude.toAutomaton(), Operations.DEFAULT_MAX_DETERMINIZED_STATES); + a = Operations.minus(a, exclude.toAutomaton(), Operations.DEFAULT_DETERMINIZE_WORK_LIMIT); } return a; } diff --git a/server/src/main/java/org/elasticsearch/search/suggest/completion/FuzzyOptions.java b/server/src/main/java/org/elasticsearch/search/suggest/completion/FuzzyOptions.java index ee962deb262dc..9db5efaa449fb 100644 --- a/server/src/main/java/org/elasticsearch/search/suggest/completion/FuzzyOptions.java +++ b/server/src/main/java/org/elasticsearch/search/suggest/completion/FuzzyOptions.java @@ -197,7 +197,7 @@ public static class Builder { private int fuzzyMinLength = FuzzyCompletionQuery.DEFAULT_MIN_FUZZY_LENGTH; private int fuzzyPrefixLength = FuzzyCompletionQuery.DEFAULT_NON_FUZZY_PREFIX; private boolean unicodeAware = FuzzyCompletionQuery.DEFAULT_UNICODE_AWARE; - private int maxDeterminizedStates = Operations.DEFAULT_MAX_DETERMINIZED_STATES; + private int maxDeterminizedStates = Operations.DEFAULT_DETERMINIZE_WORK_LIMIT; public Builder() { } diff --git a/server/src/main/java/org/elasticsearch/search/suggest/completion/RegexOptions.java b/server/src/main/java/org/elasticsearch/search/suggest/completion/RegexOptions.java index 95e5ba2d00dc0..722fd2a598631 100644 --- a/server/src/main/java/org/elasticsearch/search/suggest/completion/RegexOptions.java +++ b/server/src/main/java/org/elasticsearch/search/suggest/completion/RegexOptions.java @@ -132,7 +132,7 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws */ public static class Builder { private int flagsValue = RegExp.ALL; - private int maxDeterminizedStates = Operations.DEFAULT_MAX_DETERMINIZED_STATES; + private int maxDeterminizedStates = Operations.DEFAULT_DETERMINIZE_WORK_LIMIT; public Builder() { } diff --git a/server/src/test/java/org/elasticsearch/index/mapper/AbstractNonTextScriptFieldTypeTestCase.java b/server/src/test/java/org/elasticsearch/index/mapper/AbstractNonTextScriptFieldTypeTestCase.java index 18d4b91135ac4..c5fc0d3d44a8c 100644 --- a/server/src/test/java/org/elasticsearch/index/mapper/AbstractNonTextScriptFieldTypeTestCase.java +++ b/server/src/test/java/org/elasticsearch/index/mapper/AbstractNonTextScriptFieldTypeTestCase.java @@ -28,7 +28,7 @@ public void testPrefixQueryIsError() { public void testRegexpQueryIsError() { assertQueryOnlyOnTextAndKeyword( "regexp", - () -> simpleMappedFieldType().regexpQuery("cat", 0, 0, Operations.DEFAULT_MAX_DETERMINIZED_STATES, null, mockContext()) + () -> simpleMappedFieldType().regexpQuery("cat", 0, 0, Operations.DEFAULT_DETERMINIZE_WORK_LIMIT, null, mockContext()) ); } diff --git a/server/src/test/java/org/elasticsearch/index/mapper/CompletionFieldMapperTests.java b/server/src/test/java/org/elasticsearch/index/mapper/CompletionFieldMapperTests.java index 880ff00961cad..8389f81794eec 100644 --- a/server/src/test/java/org/elasticsearch/index/mapper/CompletionFieldMapperTests.java +++ b/server/src/test/java/org/elasticsearch/index/mapper/CompletionFieldMapperTests.java @@ -723,7 +723,7 @@ public void testFuzzyQueryType() throws Exception { CompletionFieldMapper completionFieldMapper = (CompletionFieldMapper) fieldMapper; Query prefixQuery = completionFieldMapper.fieldType().fuzzyQuery("co", Fuzziness.fromEdits(FuzzyCompletionQuery.DEFAULT_MAX_EDITS), FuzzyCompletionQuery.DEFAULT_NON_FUZZY_PREFIX, - FuzzyCompletionQuery.DEFAULT_MIN_FUZZY_LENGTH, Operations.DEFAULT_MAX_DETERMINIZED_STATES, + FuzzyCompletionQuery.DEFAULT_MIN_FUZZY_LENGTH, Operations.DEFAULT_DETERMINIZE_WORK_LIMIT, FuzzyCompletionQuery.DEFAULT_TRANSPOSITIONS, FuzzyCompletionQuery.DEFAULT_UNICODE_AWARE); assertThat(prefixQuery, instanceOf(FuzzyCompletionQuery.class)); } @@ -733,7 +733,7 @@ public void testRegexQueryType() throws Exception { Mapper fieldMapper = defaultMapper.mappers().getMapper("field"); CompletionFieldMapper completionFieldMapper = (CompletionFieldMapper) fieldMapper; Query prefixQuery = completionFieldMapper.fieldType() - .regexpQuery(new BytesRef("co"), RegExp.ALL, Operations.DEFAULT_MAX_DETERMINIZED_STATES); + .regexpQuery(new BytesRef("co"), RegExp.ALL, Operations.DEFAULT_DETERMINIZE_WORK_LIMIT); assertThat(prefixQuery, instanceOf(RegexCompletionQuery.class)); } diff --git a/server/src/test/java/org/elasticsearch/index/mapper/KeywordScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/index/mapper/KeywordScriptFieldTypeTests.java index 6c6fbd7241439..16cd48e20af12 100644 --- a/server/src/test/java/org/elasticsearch/index/mapper/KeywordScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/index/mapper/KeywordScriptFieldTypeTests.java @@ -269,7 +269,7 @@ public void testRegexpQuery() throws IOException { IndexSearcher searcher = newSearcher(reader); assertThat( searcher.count( - simpleMappedFieldType().regexpQuery("ca.+", 0, 0, Operations.DEFAULT_MAX_DETERMINIZED_STATES, null, mockContext()) + simpleMappedFieldType().regexpQuery("ca.+", 0, 0, Operations.DEFAULT_DETERMINIZE_WORK_LIMIT, null, mockContext()) ), equalTo(2) ); diff --git a/server/src/test/java/org/elasticsearch/index/query/QueryStringQueryBuilderTests.java b/server/src/test/java/org/elasticsearch/index/query/QueryStringQueryBuilderTests.java index 6105054635e6e..6899c2dad7cd3 100644 --- a/server/src/test/java/org/elasticsearch/index/query/QueryStringQueryBuilderTests.java +++ b/server/src/test/java/org/elasticsearch/index/query/QueryStringQueryBuilderTests.java @@ -741,12 +741,12 @@ public void testToQueryRegExpQuery() throws Exception { } public void testToQueryRegExpQueryTooComplex() throws Exception { - QueryStringQueryBuilder queryBuilder = queryStringQuery("/[ac]*a[ac]{50,200}/").defaultField(TEXT_FIELD_NAME); + QueryStringQueryBuilder queryBuilder = queryStringQuery("/[ac]*a[ac]{200,500}/").defaultField(TEXT_FIELD_NAME); TooComplexToDeterminizeException e = expectThrows(TooComplexToDeterminizeException.class, () -> queryBuilder.toQuery(createSearchExecutionContext())); assertThat(e.getMessage(), containsString("Determinizing [ac]*")); - assertThat(e.getMessage(), containsString("would result in more than 10000 states")); + assertThat(e.getMessage(), containsString("would require more than 10000 effort.")); } /** @@ -768,7 +768,7 @@ public void testToQueryRegExpQueryMaxDeterminizedStatesParsing() throws Exceptio TooComplexToDeterminizeException e = expectThrows(TooComplexToDeterminizeException.class, () -> queryBuilder.toQuery(createSearchExecutionContext())); assertThat(e.getMessage(), containsString("Determinizing [ac]*")); - assertThat(e.getMessage(), containsString("would result in more than 10 states")); + assertThat(e.getMessage(), containsString("would require more than 10 effort.")); } public void testToQueryFuzzyQueryAutoFuziness() throws Exception { diff --git a/server/src/test/java/org/elasticsearch/search/fetch/subphase/FieldFetcherTests.java b/server/src/test/java/org/elasticsearch/search/fetch/subphase/FieldFetcherTests.java index 6cc4bcef54fa1..354c1a45ffc87 100644 --- a/server/src/test/java/org/elasticsearch/search/fetch/subphase/FieldFetcherTests.java +++ b/server/src/test/java/org/elasticsearch/search/fetch/subphase/FieldFetcherTests.java @@ -910,10 +910,9 @@ public void testTooManyUnmappedFieldWildcardPattern() throws IOException { XContentBuilder source = XContentFactory.jsonBuilder().startObject().field("a", "foo").endObject(); - List fieldAndFormatList = new ArrayList<>(); - boolean includeUnmapped = true; - for (int i = 0; i < 1000; i++) { - fieldAndFormatList.add(new FieldAndFormat(randomAlphaOfLength(150) + "*", null, includeUnmapped)); + List fieldAndFormatList = new ArrayList<>(10_000); + for (int i = 0; i < 8000; i++) { + fieldAndFormatList.add(new FieldAndFormat(randomAlphaOfLength(150) + "*", null, true)); } expectThrows(TooComplexToDeterminizeException.class, () -> fetchFields(mapperService, source, fieldAndFormatList)); } diff --git a/server/src/test/java/org/elasticsearch/search/runtime/StringScriptFieldRegexpQueryTests.java b/server/src/test/java/org/elasticsearch/search/runtime/StringScriptFieldRegexpQueryTests.java index d601567153d07..e66cce0dd3bac 100644 --- a/server/src/test/java/org/elasticsearch/search/runtime/StringScriptFieldRegexpQueryTests.java +++ b/server/src/test/java/org/elasticsearch/search/runtime/StringScriptFieldRegexpQueryTests.java @@ -29,7 +29,7 @@ protected StringScriptFieldRegexpQuery createTestInstance() { randomAlphaOfLength(6), randomInt(RegExp.ALL), matchFlags, - Operations.DEFAULT_MAX_DETERMINIZED_STATES + Operations.DEFAULT_DETERMINIZE_WORK_LIMIT ); } @@ -42,7 +42,7 @@ protected StringScriptFieldRegexpQuery copy(StringScriptFieldRegexpQuery orig) { orig.pattern(), orig.syntaxFlags(), orig.matchFlags(), - Operations.DEFAULT_MAX_DETERMINIZED_STATES + Operations.DEFAULT_DETERMINIZE_WORK_LIMIT ); } @@ -79,7 +79,7 @@ protected StringScriptFieldRegexpQuery mutate(StringScriptFieldRegexpQuery orig) pattern, syntaxFlags, matchFlags, - Operations.DEFAULT_MAX_DETERMINIZED_STATES + Operations.DEFAULT_DETERMINIZE_WORK_LIMIT ); } @@ -92,7 +92,7 @@ public void testMatches() { "a.+b", 0, 0, - Operations.DEFAULT_MAX_DETERMINIZED_STATES + Operations.DEFAULT_DETERMINIZE_WORK_LIMIT ); assertTrue(query.matches(List.of("astuffb"))); assertFalse(query.matches(List.of("astuffB"))); @@ -109,7 +109,7 @@ public void testMatches() { "a.+b", 0, RegExp.ASCII_CASE_INSENSITIVE, - Operations.DEFAULT_MAX_DETERMINIZED_STATES + Operations.DEFAULT_DETERMINIZE_WORK_LIMIT ); assertTrue(ciQuery.matches(List.of("astuffB"))); assertTrue(ciQuery.matches(List.of("Astuffb", "fffff"))); @@ -129,7 +129,7 @@ public void testVisit() { "a.+b", 0, 0, - Operations.DEFAULT_MAX_DETERMINIZED_STATES + Operations.DEFAULT_DETERMINIZE_WORK_LIMIT ); ByteRunAutomaton automaton = visitForSingleAutomata(query); BytesRef term = new BytesRef("astuffb"); diff --git a/test/framework/src/main/java/org/elasticsearch/indices/analysis/AnalysisFactoryTestCase.java b/test/framework/src/main/java/org/elasticsearch/indices/analysis/AnalysisFactoryTestCase.java index e05947e27aad7..43d88d8af0c71 100644 --- a/test/framework/src/main/java/org/elasticsearch/indices/analysis/AnalysisFactoryTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/indices/analysis/AnalysisFactoryTestCase.java @@ -188,6 +188,8 @@ public abstract class AnalysisFactoryTestCase extends ESTestCase { .put("dropifflagged", Void.class) // LUCENE-9575 .put("patterntyping", Void.class) + .put("telugustem", Void.class) + .put("telugunormalization", Void.class) .immutableMap(); static final Map> KNOWN_CHARFILTERS = new MapBuilder>() diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/FieldPermissions.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/FieldPermissions.java index 109d9f754b152..1dec954460ef8 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/FieldPermissions.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/FieldPermissions.java @@ -169,8 +169,8 @@ public static Automaton buildPermittedFieldsAutomaton(final String[] grantedFiel deniedFieldsAutomaton = Automatons.patterns(deniedFields); } - grantedFieldsAutomaton = MinimizationOperations.minimize(grantedFieldsAutomaton, Operations.DEFAULT_MAX_DETERMINIZED_STATES); - deniedFieldsAutomaton = MinimizationOperations.minimize(deniedFieldsAutomaton, Operations.DEFAULT_MAX_DETERMINIZED_STATES); + grantedFieldsAutomaton = MinimizationOperations.minimize(grantedFieldsAutomaton, Operations.DEFAULT_DETERMINIZE_WORK_LIMIT); + deniedFieldsAutomaton = MinimizationOperations.minimize(deniedFieldsAutomaton, Operations.DEFAULT_DETERMINIZE_WORK_LIMIT); if (subsetOf(deniedFieldsAutomaton, grantedFieldsAutomaton) == false) { throw new ElasticsearchSecurityException("Exceptions for field permissions must be a subset of the " + diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/support/Automatons.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/support/Automatons.java index 404ce5fa68365..fff28537798b6 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/support/Automatons.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/support/Automatons.java @@ -29,7 +29,7 @@ import java.util.function.Function; import java.util.function.Predicate; -import static org.apache.lucene.util.automaton.Operations.DEFAULT_MAX_DETERMINIZED_STATES; +import static org.apache.lucene.util.automaton.Operations.DEFAULT_DETERMINIZE_WORK_LIMIT; import static org.apache.lucene.util.automaton.Operations.concatenate; import static org.apache.lucene.util.automaton.Operations.intersection; import static org.apache.lucene.util.automaton.Operations.minus; @@ -39,7 +39,7 @@ public final class Automatons { static final Setting MAX_DETERMINIZED_STATES_SETTING = - Setting.intSetting("xpack.security.automata.max_determinized_states", 100000, DEFAULT_MAX_DETERMINIZED_STATES, + Setting.intSetting("xpack.security.automata.max_determinized_states", 100000, DEFAULT_DETERMINIZE_WORK_LIMIT, Setting.Property.NodeScope); static final Setting CACHE_ENABLED = diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/FieldSubsetReaderTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/FieldSubsetReaderTests.java index 9210e3a6c4698..0e32314230a84 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/FieldSubsetReaderTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/FieldSubsetReaderTests.java @@ -643,7 +643,7 @@ public void testSourceFiltering() { // exclude on exact value include = new CharacterRunAutomaton(Operations.minus( Automata.makeAnyString(), Automatons.patterns("foo.bar"), - Operations.DEFAULT_MAX_DETERMINIZED_STATES)); + Operations.DEFAULT_DETERMINIZE_WORK_LIMIT)); filtered = FieldSubsetReader.filter(map, include, 0); expected = new HashMap<>(); expected.put("bar", "baz"); @@ -654,7 +654,7 @@ public void testSourceFiltering() { // exclude on wildcard include = new CharacterRunAutomaton(Operations.minus( Automata.makeAnyString(), Automatons.patterns("foo.*"), - Operations.DEFAULT_MAX_DETERMINIZED_STATES)); + Operations.DEFAULT_DETERMINIZE_WORK_LIMIT)); filtered = FieldSubsetReader.filter(map, include, 0); expected = Collections.singletonMap("bar", "baz"); @@ -694,7 +694,7 @@ public void testSourceFiltering() { // exclude on inner array include = new CharacterRunAutomaton(Operations.minus( Automata.makeAnyString(), Automatons.patterns("foo.baz"), - Operations.DEFAULT_MAX_DETERMINIZED_STATES)); + Operations.DEFAULT_DETERMINIZE_WORK_LIMIT)); filtered = FieldSubsetReader.filter(map, include, 0); expected = new HashMap<>(); subArray = new ArrayList<>(); @@ -709,7 +709,7 @@ public void testSourceFiltering() { // exclude on inner array 2 include = new CharacterRunAutomaton(Operations.minus( Automata.makeAnyString(), Automatons.patterns("foo"), - Operations.DEFAULT_MAX_DETERMINIZED_STATES)); + Operations.DEFAULT_DETERMINIZE_WORK_LIMIT)); filtered = FieldSubsetReader.filter(map, include, 0); expected = new HashMap<>(); subArray = new ArrayList<>(); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/support/AutomatonsTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/support/AutomatonsTests.java index 571cefc9c41f5..c41c37a5d132f 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/support/AutomatonsTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/support/AutomatonsTests.java @@ -20,7 +20,7 @@ import java.util.List; import java.util.Locale; -import static org.apache.lucene.util.automaton.Operations.DEFAULT_MAX_DETERMINIZED_STATES; +import static org.apache.lucene.util.automaton.Operations.DEFAULT_DETERMINIZE_WORK_LIMIT; import static org.elasticsearch.xpack.core.security.support.Automatons.pattern; import static org.elasticsearch.xpack.core.security.support.Automatons.patterns; import static org.elasticsearch.xpack.core.security.support.Automatons.predicate; @@ -112,12 +112,12 @@ public void testPatternComplexity() { } private void assertMatch(Automaton automaton, String text) { - CharacterRunAutomaton runAutomaton = new CharacterRunAutomaton(automaton, DEFAULT_MAX_DETERMINIZED_STATES); + CharacterRunAutomaton runAutomaton = new CharacterRunAutomaton(automaton, DEFAULT_DETERMINIZE_WORK_LIMIT); assertTrue(runAutomaton.run(text)); } private void assertMismatch(Automaton automaton, String text) { - CharacterRunAutomaton runAutomaton = new CharacterRunAutomaton(automaton, DEFAULT_MAX_DETERMINIZED_STATES); + CharacterRunAutomaton runAutomaton = new CharacterRunAutomaton(automaton, DEFAULT_DETERMINIZE_WORK_LIMIT); assertFalse(runAutomaton.run(text)); } @@ -153,12 +153,12 @@ public void testSettingMaxDeterminizedStates() { Automatons.updateConfiguration(settings); assertEquals(10000, Automatons.getMaxDeterminizedStates()); - final List names = new ArrayList<>(1024); - for (int i = 0; i < 1024; i++) { - names.add(randomAlphaOfLength(48)); + final List names = new ArrayList<>(4096); + for (int i = 0; i < 4096; i++) { + names.add(randomAlphaOfLength(64)); } TooComplexToDeterminizeException e = expectThrows(TooComplexToDeterminizeException.class, () -> Automatons.patterns(names)); - assertThat(e.getMaxDeterminizedStates(), equalTo(10000)); + assertThat(e.getDeterminizeWorkLimit(), equalTo(10000)); } finally { Automatons.updateConfiguration(Settings.EMPTY); assertEquals(100000, Automatons.getMaxDeterminizedStates()); diff --git a/x-pack/plugin/ql/src/main/java/org/elasticsearch/xpack/ql/expression/predicate/regex/LikePattern.java b/x-pack/plugin/ql/src/main/java/org/elasticsearch/xpack/ql/expression/predicate/regex/LikePattern.java index 7804fe416a80f..28fe8fa43602e 100644 --- a/x-pack/plugin/ql/src/main/java/org/elasticsearch/xpack/ql/expression/predicate/regex/LikePattern.java +++ b/x-pack/plugin/ql/src/main/java/org/elasticsearch/xpack/ql/expression/predicate/regex/LikePattern.java @@ -52,7 +52,7 @@ public char escape() { @Override Automaton createAutomaton() { Automaton automaton = WildcardQuery.toAutomaton(new Term(null, wildcard)); - return MinimizationOperations.minimize(automaton, Operations.DEFAULT_MAX_DETERMINIZED_STATES); + return MinimizationOperations.minimize(automaton, Operations.DEFAULT_DETERMINIZE_WORK_LIMIT); } @Override diff --git a/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/store/FileRolesStoreTests.java b/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/store/FileRolesStoreTests.java index 4b33aa6f9551c..e2625a2f11ff0 100644 --- a/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/store/FileRolesStoreTests.java +++ b/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/store/FileRolesStoreTests.java @@ -153,7 +153,7 @@ public void testParseFile() throws Exception { assertThat(group.privilege(), notNullValue()); assertTrue(Operations.sameLanguage(group.privilege().getAutomaton(), MinimizationOperations.minimize(Operations.union(IndexPrivilege.READ.getAutomaton(), IndexPrivilege.WRITE.getAutomaton()), - Operations.DEFAULT_MAX_DETERMINIZED_STATES))); + Operations.DEFAULT_DETERMINIZE_WORK_LIMIT))); descriptor = roles.get("role4"); assertNull(descriptor); diff --git a/x-pack/plugin/sql/sql-action/licenses/lucene-core-8.10.0-snapshot-bf2fcb53079.jar.sha1 b/x-pack/plugin/sql/sql-action/licenses/lucene-core-8.10.0-snapshot-bf2fcb53079.jar.sha1 new file mode 100644 index 0000000000000..2a546f6674e06 --- /dev/null +++ b/x-pack/plugin/sql/sql-action/licenses/lucene-core-8.10.0-snapshot-bf2fcb53079.jar.sha1 @@ -0,0 +1 @@ +f33b45dbbce59e727e5a82dddab48c8c7681e25b \ No newline at end of file diff --git a/x-pack/plugin/sql/sql-action/licenses/lucene-core-8.9.0.jar.sha1 b/x-pack/plugin/sql/sql-action/licenses/lucene-core-8.9.0.jar.sha1 deleted file mode 100644 index 859cdb2013408..0000000000000 --- a/x-pack/plugin/sql/sql-action/licenses/lucene-core-8.9.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -5c3f72357089f7f0c1ef44bbe7b4c67b6149a5af \ No newline at end of file diff --git a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpClient.java b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpClient.java index fd7f2d2726748..84c2f842ff5a0 100644 --- a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpClient.java +++ b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/http/HttpClient.java @@ -411,7 +411,7 @@ static CharacterRunAutomaton createAutomaton(List whiteListedHosts) { } Automaton whiteListAutomaton = Regex.simpleMatchToAutomaton(whiteListedHosts.toArray(Strings.EMPTY_ARRAY)); - whiteListAutomaton = MinimizationOperations.minimize(whiteListAutomaton, Operations.DEFAULT_MAX_DETERMINIZED_STATES); + whiteListAutomaton = MinimizationOperations.minimize(whiteListAutomaton, Operations.DEFAULT_DETERMINIZE_WORK_LIMIT); return new CharacterRunAutomaton(whiteListAutomaton); } }