From 07b98e5e88706312d11c5f70583c6373e0ce4db0 Mon Sep 17 00:00:00 2001 From: Adrien Grand Date: Wed, 14 Jun 2017 11:29:30 +0200 Subject: [PATCH 1/3] Upgrade to lucene-7.0.0-snapshot-92b1783. This snapshot has faster range queries on range fields (LUCENE-7828), more accurate norms (LUCENE-7730) and the ability to use fake term frequencies (LUCENE-7854). --- buildSrc/version.properties | 2 +- ...lyzers-common-7.0.0-snapshot-92b1783.jar.sha1 | 1 + ...lyzers-common-7.0.0-snapshot-a0aef2f.jar.sha1 | 1 - ...ckward-codecs-7.0.0-snapshot-92b1783.jar.sha1 | 1 + ...ckward-codecs-7.0.0-snapshot-a0aef2f.jar.sha1 | 1 - .../lucene-core-7.0.0-snapshot-92b1783.jar.sha1 | 1 + .../lucene-core-7.0.0-snapshot-a0aef2f.jar.sha1 | 1 - ...cene-grouping-7.0.0-snapshot-92b1783.jar.sha1 | 1 + ...cene-grouping-7.0.0-snapshot-a0aef2f.jar.sha1 | 1 - ...e-highlighter-7.0.0-snapshot-92b1783.jar.sha1 | 1 + ...e-highlighter-7.0.0-snapshot-a0aef2f.jar.sha1 | 1 - .../lucene-join-7.0.0-snapshot-92b1783.jar.sha1 | 1 + .../lucene-join-7.0.0-snapshot-a0aef2f.jar.sha1 | 1 - ...lucene-memory-7.0.0-snapshot-92b1783.jar.sha1 | 1 + ...lucene-memory-7.0.0-snapshot-a0aef2f.jar.sha1 | 1 - .../lucene-misc-7.0.0-snapshot-92b1783.jar.sha1 | 1 + .../lucene-misc-7.0.0-snapshot-a0aef2f.jar.sha1 | 1 - ...ucene-queries-7.0.0-snapshot-92b1783.jar.sha1 | 1 + ...ucene-queries-7.0.0-snapshot-a0aef2f.jar.sha1 | 1 - ...e-queryparser-7.0.0-snapshot-92b1783.jar.sha1 | 1 + ...e-queryparser-7.0.0-snapshot-a0aef2f.jar.sha1 | 1 - ...ucene-sandbox-7.0.0-snapshot-92b1783.jar.sha1 | 1 + ...ucene-sandbox-7.0.0-snapshot-a0aef2f.jar.sha1 | 1 - ...ucene-spatial-7.0.0-snapshot-92b1783.jar.sha1 | 1 + ...ucene-spatial-7.0.0-snapshot-a0aef2f.jar.sha1 | 1 - ...patial-extras-7.0.0-snapshot-92b1783.jar.sha1 | 1 + ...patial-extras-7.0.0-snapshot-a0aef2f.jar.sha1 | 1 - ...ene-spatial3d-7.0.0-snapshot-92b1783.jar.sha1 | 1 + ...ene-spatial3d-7.0.0-snapshot-a0aef2f.jar.sha1 | 1 - ...ucene-suggest-7.0.0-snapshot-92b1783.jar.sha1 | 1 + ...ucene-suggest-7.0.0-snapshot-a0aef2f.jar.sha1 | 1 - .../subphase/highlight/UnifiedHighlighter.java | 5 ++--- .../org/elasticsearch/bootstrap/security.policy | 4 ++-- .../bootstrap/test-framework.policy | 2 +- .../indices/analyze/AnalyzeActionIT.java | 12 +++++------- .../search/basic/TransportTwoNodesSearchIT.java | 6 ++++-- .../functionscore/DecayFunctionScoreIT.java | 15 ++++++++++++--- .../search/functionscore/QueryRescorerIT.java | 4 ++-- .../pattern-replace-charfilter.asciidoc | 4 ++-- .../tokenizers/edgengram-tokenizer.asciidoc | 4 ++-- docs/reference/how-to/recipes.asciidoc | 14 +++++++------- .../reference/query-dsl/percolate-query.asciidoc | 10 +++++----- docs/reference/search/explain.asciidoc | 8 ++++---- .../search/request/highlighting.asciidoc | 8 ++++---- .../reference/search/request/inner-hits.asciidoc | 16 ++++++++-------- ...e-expressions-7.0.0-snapshot-92b1783.jar.sha1 | 1 + ...e-expressions-7.0.0-snapshot-a0aef2f.jar.sha1 | 1 - ...analyzers-icu-7.0.0-snapshot-92b1783.jar.sha1 | 1 + ...analyzers-icu-7.0.0-snapshot-a0aef2f.jar.sha1 | 1 - ...zers-kuromoji-7.0.0-snapshot-92b1783.jar.sha1 | 1 + ...zers-kuromoji-7.0.0-snapshot-a0aef2f.jar.sha1 | 1 - ...zers-phonetic-7.0.0-snapshot-92b1783.jar.sha1 | 1 + ...zers-phonetic-7.0.0-snapshot-a0aef2f.jar.sha1 | 1 - ...yzers-smartcn-7.0.0-snapshot-92b1783.jar.sha1 | 1 + ...yzers-smartcn-7.0.0-snapshot-a0aef2f.jar.sha1 | 1 - ...yzers-stempel-7.0.0-snapshot-92b1783.jar.sha1 | 1 + ...yzers-stempel-7.0.0-snapshot-a0aef2f.jar.sha1 | 1 - ...rs-morfologik-7.0.0-snapshot-92b1783.jar.sha1 | 1 + ...rs-morfologik-7.0.0-snapshot-a0aef2f.jar.sha1 | 1 - .../analysis/AnalysisFactoryTestCase.java | 3 +++ .../elasticsearch/test/test/ESTestCaseTests.java | 6 ++++-- 61 files changed, 90 insertions(+), 77 deletions(-) create mode 100644 core/licenses/lucene-analyzers-common-7.0.0-snapshot-92b1783.jar.sha1 delete mode 100644 core/licenses/lucene-analyzers-common-7.0.0-snapshot-a0aef2f.jar.sha1 create mode 100644 core/licenses/lucene-backward-codecs-7.0.0-snapshot-92b1783.jar.sha1 delete mode 100644 core/licenses/lucene-backward-codecs-7.0.0-snapshot-a0aef2f.jar.sha1 create mode 100644 core/licenses/lucene-core-7.0.0-snapshot-92b1783.jar.sha1 delete mode 100644 core/licenses/lucene-core-7.0.0-snapshot-a0aef2f.jar.sha1 create mode 100644 core/licenses/lucene-grouping-7.0.0-snapshot-92b1783.jar.sha1 delete mode 100644 core/licenses/lucene-grouping-7.0.0-snapshot-a0aef2f.jar.sha1 create mode 100644 core/licenses/lucene-highlighter-7.0.0-snapshot-92b1783.jar.sha1 delete mode 100644 core/licenses/lucene-highlighter-7.0.0-snapshot-a0aef2f.jar.sha1 create mode 100644 core/licenses/lucene-join-7.0.0-snapshot-92b1783.jar.sha1 delete mode 100644 core/licenses/lucene-join-7.0.0-snapshot-a0aef2f.jar.sha1 create mode 100644 core/licenses/lucene-memory-7.0.0-snapshot-92b1783.jar.sha1 delete mode 100644 core/licenses/lucene-memory-7.0.0-snapshot-a0aef2f.jar.sha1 create mode 100644 core/licenses/lucene-misc-7.0.0-snapshot-92b1783.jar.sha1 delete mode 100644 core/licenses/lucene-misc-7.0.0-snapshot-a0aef2f.jar.sha1 create mode 100644 core/licenses/lucene-queries-7.0.0-snapshot-92b1783.jar.sha1 delete mode 100644 core/licenses/lucene-queries-7.0.0-snapshot-a0aef2f.jar.sha1 create mode 100644 core/licenses/lucene-queryparser-7.0.0-snapshot-92b1783.jar.sha1 delete mode 100644 core/licenses/lucene-queryparser-7.0.0-snapshot-a0aef2f.jar.sha1 create mode 100644 core/licenses/lucene-sandbox-7.0.0-snapshot-92b1783.jar.sha1 delete mode 100644 core/licenses/lucene-sandbox-7.0.0-snapshot-a0aef2f.jar.sha1 create mode 100644 core/licenses/lucene-spatial-7.0.0-snapshot-92b1783.jar.sha1 delete mode 100644 core/licenses/lucene-spatial-7.0.0-snapshot-a0aef2f.jar.sha1 create mode 100644 core/licenses/lucene-spatial-extras-7.0.0-snapshot-92b1783.jar.sha1 delete mode 100644 core/licenses/lucene-spatial-extras-7.0.0-snapshot-a0aef2f.jar.sha1 create mode 100644 core/licenses/lucene-spatial3d-7.0.0-snapshot-92b1783.jar.sha1 delete mode 100644 core/licenses/lucene-spatial3d-7.0.0-snapshot-a0aef2f.jar.sha1 create mode 100644 core/licenses/lucene-suggest-7.0.0-snapshot-92b1783.jar.sha1 delete mode 100644 core/licenses/lucene-suggest-7.0.0-snapshot-a0aef2f.jar.sha1 create mode 100644 modules/lang-expression/licenses/lucene-expressions-7.0.0-snapshot-92b1783.jar.sha1 delete mode 100644 modules/lang-expression/licenses/lucene-expressions-7.0.0-snapshot-a0aef2f.jar.sha1 create mode 100644 plugins/analysis-icu/licenses/lucene-analyzers-icu-7.0.0-snapshot-92b1783.jar.sha1 delete mode 100644 plugins/analysis-icu/licenses/lucene-analyzers-icu-7.0.0-snapshot-a0aef2f.jar.sha1 create mode 100644 plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-7.0.0-snapshot-92b1783.jar.sha1 delete mode 100644 plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-7.0.0-snapshot-a0aef2f.jar.sha1 create mode 100644 plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-7.0.0-snapshot-92b1783.jar.sha1 delete mode 100644 plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-7.0.0-snapshot-a0aef2f.jar.sha1 create mode 100644 plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-7.0.0-snapshot-92b1783.jar.sha1 delete mode 100644 plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-7.0.0-snapshot-a0aef2f.jar.sha1 create mode 100644 plugins/analysis-stempel/licenses/lucene-analyzers-stempel-7.0.0-snapshot-92b1783.jar.sha1 delete mode 100644 plugins/analysis-stempel/licenses/lucene-analyzers-stempel-7.0.0-snapshot-a0aef2f.jar.sha1 create mode 100644 plugins/analysis-ukrainian/licenses/lucene-analyzers-morfologik-7.0.0-snapshot-92b1783.jar.sha1 delete mode 100644 plugins/analysis-ukrainian/licenses/lucene-analyzers-morfologik-7.0.0-snapshot-a0aef2f.jar.sha1 diff --git a/buildSrc/version.properties b/buildSrc/version.properties index e7243b9dad9ee..79eb967d341c8 100644 --- a/buildSrc/version.properties +++ b/buildSrc/version.properties @@ -1,6 +1,6 @@ # When updating elasticsearch, please update 'rest' version in core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy elasticsearch = 6.0.0-alpha3 -lucene = 7.0.0-snapshot-a0aef2f +lucene = 7.0.0-snapshot-92b1783 # optional dependencies spatial4j = 0.6 diff --git a/core/licenses/lucene-analyzers-common-7.0.0-snapshot-92b1783.jar.sha1 b/core/licenses/lucene-analyzers-common-7.0.0-snapshot-92b1783.jar.sha1 new file mode 100644 index 0000000000000..e5e1508d041d8 --- /dev/null +++ b/core/licenses/lucene-analyzers-common-7.0.0-snapshot-92b1783.jar.sha1 @@ -0,0 +1 @@ +5bf8d8b7d885e25c343c187d1849580e21ef3fce \ No newline at end of file diff --git a/core/licenses/lucene-analyzers-common-7.0.0-snapshot-a0aef2f.jar.sha1 b/core/licenses/lucene-analyzers-common-7.0.0-snapshot-a0aef2f.jar.sha1 deleted file mode 100644 index 9a1f65be58fe6..0000000000000 --- a/core/licenses/lucene-analyzers-common-7.0.0-snapshot-a0aef2f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -5e191674c50c9d99c9838da52cbf67c411998f4e \ No newline at end of file diff --git a/core/licenses/lucene-backward-codecs-7.0.0-snapshot-92b1783.jar.sha1 b/core/licenses/lucene-backward-codecs-7.0.0-snapshot-92b1783.jar.sha1 new file mode 100644 index 0000000000000..7c5e91e95539d --- /dev/null +++ b/core/licenses/lucene-backward-codecs-7.0.0-snapshot-92b1783.jar.sha1 @@ -0,0 +1 @@ +9696b87e27ea949fabc62606833ab63e6e5473b9 \ No newline at end of file diff --git a/core/licenses/lucene-backward-codecs-7.0.0-snapshot-a0aef2f.jar.sha1 b/core/licenses/lucene-backward-codecs-7.0.0-snapshot-a0aef2f.jar.sha1 deleted file mode 100644 index 8ffb313c69496..0000000000000 --- a/core/licenses/lucene-backward-codecs-7.0.0-snapshot-a0aef2f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -45bc34ab640d5d1a7491b523631b902f20db5384 \ No newline at end of file diff --git a/core/licenses/lucene-core-7.0.0-snapshot-92b1783.jar.sha1 b/core/licenses/lucene-core-7.0.0-snapshot-92b1783.jar.sha1 new file mode 100644 index 0000000000000..f63e911d777ef --- /dev/null +++ b/core/licenses/lucene-core-7.0.0-snapshot-92b1783.jar.sha1 @@ -0,0 +1 @@ +d65b95dc24ce104e4d815b31f7159c5f6e97831d \ No newline at end of file diff --git a/core/licenses/lucene-core-7.0.0-snapshot-a0aef2f.jar.sha1 b/core/licenses/lucene-core-7.0.0-snapshot-a0aef2f.jar.sha1 deleted file mode 100644 index 220b0ea521223..0000000000000 --- a/core/licenses/lucene-core-7.0.0-snapshot-a0aef2f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -b44d86e9077443c3ba4918a85603734461c6b448 \ No newline at end of file diff --git a/core/licenses/lucene-grouping-7.0.0-snapshot-92b1783.jar.sha1 b/core/licenses/lucene-grouping-7.0.0-snapshot-92b1783.jar.sha1 new file mode 100644 index 0000000000000..def2dcc5b9844 --- /dev/null +++ b/core/licenses/lucene-grouping-7.0.0-snapshot-92b1783.jar.sha1 @@ -0,0 +1 @@ +3afa0db63adea8ee78b958cc85c5a6cb7750a5aa \ No newline at end of file diff --git a/core/licenses/lucene-grouping-7.0.0-snapshot-a0aef2f.jar.sha1 b/core/licenses/lucene-grouping-7.0.0-snapshot-a0aef2f.jar.sha1 deleted file mode 100644 index 99612cc340968..0000000000000 --- a/core/licenses/lucene-grouping-7.0.0-snapshot-a0aef2f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -409b616d40e2041a02890b2dc477ed845e3121e9 \ No newline at end of file diff --git a/core/licenses/lucene-highlighter-7.0.0-snapshot-92b1783.jar.sha1 b/core/licenses/lucene-highlighter-7.0.0-snapshot-92b1783.jar.sha1 new file mode 100644 index 0000000000000..1c0713b30e8e0 --- /dev/null +++ b/core/licenses/lucene-highlighter-7.0.0-snapshot-92b1783.jar.sha1 @@ -0,0 +1 @@ +586db5fba5b84d4955e349c3ca77b7df67498a24 \ No newline at end of file diff --git a/core/licenses/lucene-highlighter-7.0.0-snapshot-a0aef2f.jar.sha1 b/core/licenses/lucene-highlighter-7.0.0-snapshot-a0aef2f.jar.sha1 deleted file mode 100644 index a3bd96546f378..0000000000000 --- a/core/licenses/lucene-highlighter-7.0.0-snapshot-a0aef2f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -cfac105541315e2ca54955f681b410a7aa3bbb9d \ No newline at end of file diff --git a/core/licenses/lucene-join-7.0.0-snapshot-92b1783.jar.sha1 b/core/licenses/lucene-join-7.0.0-snapshot-92b1783.jar.sha1 new file mode 100644 index 0000000000000..5c02cc7188d6b --- /dev/null +++ b/core/licenses/lucene-join-7.0.0-snapshot-92b1783.jar.sha1 @@ -0,0 +1 @@ +8fc234d4474eaa400f5f964e18e9b179d87d86f0 \ No newline at end of file diff --git a/core/licenses/lucene-join-7.0.0-snapshot-a0aef2f.jar.sha1 b/core/licenses/lucene-join-7.0.0-snapshot-a0aef2f.jar.sha1 deleted file mode 100644 index 92c0c80f6a498..0000000000000 --- a/core/licenses/lucene-join-7.0.0-snapshot-a0aef2f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -993c1331130dd26c632b964fd8caac259bb9f3fc \ No newline at end of file diff --git a/core/licenses/lucene-memory-7.0.0-snapshot-92b1783.jar.sha1 b/core/licenses/lucene-memory-7.0.0-snapshot-92b1783.jar.sha1 new file mode 100644 index 0000000000000..3ef2c1af86a67 --- /dev/null +++ b/core/licenses/lucene-memory-7.0.0-snapshot-92b1783.jar.sha1 @@ -0,0 +1 @@ +3c70558114d053c025d04347b13bd10317c1db69 \ No newline at end of file diff --git a/core/licenses/lucene-memory-7.0.0-snapshot-a0aef2f.jar.sha1 b/core/licenses/lucene-memory-7.0.0-snapshot-a0aef2f.jar.sha1 deleted file mode 100644 index 6de623ae884a4..0000000000000 --- a/core/licenses/lucene-memory-7.0.0-snapshot-a0aef2f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -ec1460a28850410112a6349a7fff27df31242295 \ No newline at end of file diff --git a/core/licenses/lucene-misc-7.0.0-snapshot-92b1783.jar.sha1 b/core/licenses/lucene-misc-7.0.0-snapshot-92b1783.jar.sha1 new file mode 100644 index 0000000000000..2c8e774917657 --- /dev/null +++ b/core/licenses/lucene-misc-7.0.0-snapshot-92b1783.jar.sha1 @@ -0,0 +1 @@ +bf80c278e4c1c22b6e1382fc88ed016969596b61 \ No newline at end of file diff --git a/core/licenses/lucene-misc-7.0.0-snapshot-a0aef2f.jar.sha1 b/core/licenses/lucene-misc-7.0.0-snapshot-a0aef2f.jar.sha1 deleted file mode 100644 index fd7a6b53d34f9..0000000000000 --- a/core/licenses/lucene-misc-7.0.0-snapshot-a0aef2f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -57d342dbe68cf05361ccfda6bb76f2410cac900b \ No newline at end of file diff --git a/core/licenses/lucene-queries-7.0.0-snapshot-92b1783.jar.sha1 b/core/licenses/lucene-queries-7.0.0-snapshot-92b1783.jar.sha1 new file mode 100644 index 0000000000000..a42cfebc1202b --- /dev/null +++ b/core/licenses/lucene-queries-7.0.0-snapshot-92b1783.jar.sha1 @@ -0,0 +1 @@ +fb2313a800903b991d21704ebcdce5f07a602259 \ No newline at end of file diff --git a/core/licenses/lucene-queries-7.0.0-snapshot-a0aef2f.jar.sha1 b/core/licenses/lucene-queries-7.0.0-snapshot-a0aef2f.jar.sha1 deleted file mode 100644 index e04c283d0fa0e..0000000000000 --- a/core/licenses/lucene-queries-7.0.0-snapshot-a0aef2f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -5ed10847b6a2353ac66decd5a2ee1a1d34353049 \ No newline at end of file diff --git a/core/licenses/lucene-queryparser-7.0.0-snapshot-92b1783.jar.sha1 b/core/licenses/lucene-queryparser-7.0.0-snapshot-92b1783.jar.sha1 new file mode 100644 index 0000000000000..ed2de8592f29e --- /dev/null +++ b/core/licenses/lucene-queryparser-7.0.0-snapshot-92b1783.jar.sha1 @@ -0,0 +1 @@ +24d1843ffaf4fddbd41c636274a9a8288ccdf964 \ No newline at end of file diff --git a/core/licenses/lucene-queryparser-7.0.0-snapshot-a0aef2f.jar.sha1 b/core/licenses/lucene-queryparser-7.0.0-snapshot-a0aef2f.jar.sha1 deleted file mode 100644 index 87871dc29d558..0000000000000 --- a/core/licenses/lucene-queryparser-7.0.0-snapshot-a0aef2f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -23ce6c2ea59287d8fe4fe31f466e9a58a1efe7b5 \ No newline at end of file diff --git a/core/licenses/lucene-sandbox-7.0.0-snapshot-92b1783.jar.sha1 b/core/licenses/lucene-sandbox-7.0.0-snapshot-92b1783.jar.sha1 new file mode 100644 index 0000000000000..9154d12f67129 --- /dev/null +++ b/core/licenses/lucene-sandbox-7.0.0-snapshot-92b1783.jar.sha1 @@ -0,0 +1 @@ +6413231d34b23fcbca9fd17ea6c980b594e420ff \ No newline at end of file diff --git a/core/licenses/lucene-sandbox-7.0.0-snapshot-a0aef2f.jar.sha1 b/core/licenses/lucene-sandbox-7.0.0-snapshot-a0aef2f.jar.sha1 deleted file mode 100644 index ea065b272cf6a..0000000000000 --- a/core/licenses/lucene-sandbox-7.0.0-snapshot-a0aef2f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -78bda71c8e65428927136f81112a031aa9cd04d4 \ No newline at end of file diff --git a/core/licenses/lucene-spatial-7.0.0-snapshot-92b1783.jar.sha1 b/core/licenses/lucene-spatial-7.0.0-snapshot-92b1783.jar.sha1 new file mode 100644 index 0000000000000..9339869aa24af --- /dev/null +++ b/core/licenses/lucene-spatial-7.0.0-snapshot-92b1783.jar.sha1 @@ -0,0 +1 @@ +634187ab976bcde9905b4167ad273d3db6372a20 \ No newline at end of file diff --git a/core/licenses/lucene-spatial-7.0.0-snapshot-a0aef2f.jar.sha1 b/core/licenses/lucene-spatial-7.0.0-snapshot-a0aef2f.jar.sha1 deleted file mode 100644 index c623088ce2af8..0000000000000 --- a/core/licenses/lucene-spatial-7.0.0-snapshot-a0aef2f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -1e7ea95e6197176015b13551c7496be4867ede45 \ No newline at end of file diff --git a/core/licenses/lucene-spatial-extras-7.0.0-snapshot-92b1783.jar.sha1 b/core/licenses/lucene-spatial-extras-7.0.0-snapshot-92b1783.jar.sha1 new file mode 100644 index 0000000000000..cd47c4d22b859 --- /dev/null +++ b/core/licenses/lucene-spatial-extras-7.0.0-snapshot-92b1783.jar.sha1 @@ -0,0 +1 @@ +c65576991cd1d9a75e6ee4e4a81e3d20bd160239 \ No newline at end of file diff --git a/core/licenses/lucene-spatial-extras-7.0.0-snapshot-a0aef2f.jar.sha1 b/core/licenses/lucene-spatial-extras-7.0.0-snapshot-a0aef2f.jar.sha1 deleted file mode 100644 index e51de2208ee36..0000000000000 --- a/core/licenses/lucene-spatial-extras-7.0.0-snapshot-a0aef2f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -5ae4ecd6c478456395ae9a3f954b8afc13629bb9 \ No newline at end of file diff --git a/core/licenses/lucene-spatial3d-7.0.0-snapshot-92b1783.jar.sha1 b/core/licenses/lucene-spatial3d-7.0.0-snapshot-92b1783.jar.sha1 new file mode 100644 index 0000000000000..a1f175b65dd19 --- /dev/null +++ b/core/licenses/lucene-spatial3d-7.0.0-snapshot-92b1783.jar.sha1 @@ -0,0 +1 @@ +85c7a9adc02245b7a19e5cffed83cc20043cda83 \ No newline at end of file diff --git a/core/licenses/lucene-spatial3d-7.0.0-snapshot-a0aef2f.jar.sha1 b/core/licenses/lucene-spatial3d-7.0.0-snapshot-a0aef2f.jar.sha1 deleted file mode 100644 index 25d042e923a04..0000000000000 --- a/core/licenses/lucene-spatial3d-7.0.0-snapshot-a0aef2f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -d5d1a81fc290b9660a49557f848dc2a3c4f2048b \ No newline at end of file diff --git a/core/licenses/lucene-suggest-7.0.0-snapshot-92b1783.jar.sha1 b/core/licenses/lucene-suggest-7.0.0-snapshot-92b1783.jar.sha1 new file mode 100644 index 0000000000000..2f59468ce27ea --- /dev/null +++ b/core/licenses/lucene-suggest-7.0.0-snapshot-92b1783.jar.sha1 @@ -0,0 +1 @@ +7ca7464c4b7900d7d514335d98c391851dcd84ce \ No newline at end of file diff --git a/core/licenses/lucene-suggest-7.0.0-snapshot-a0aef2f.jar.sha1 b/core/licenses/lucene-suggest-7.0.0-snapshot-a0aef2f.jar.sha1 deleted file mode 100644 index 5ac114c4547df..0000000000000 --- a/core/licenses/lucene-suggest-7.0.0-snapshot-a0aef2f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -d77cdd8f2782062a3b4c319c64f0fa4d804aafed \ No newline at end of file diff --git a/core/src/main/java/org/elasticsearch/search/fetch/subphase/highlight/UnifiedHighlighter.java b/core/src/main/java/org/elasticsearch/search/fetch/subphase/highlight/UnifiedHighlighter.java index 684c7ddbddd87..64f9b6365b370 100644 --- a/core/src/main/java/org/elasticsearch/search/fetch/subphase/highlight/UnifiedHighlighter.java +++ b/core/src/main/java/org/elasticsearch/search/fetch/subphase/highlight/UnifiedHighlighter.java @@ -24,6 +24,7 @@ import org.apache.lucene.search.uhighlight.Snippet; import org.apache.lucene.search.uhighlight.BoundedBreakIteratorScanner; import org.apache.lucene.search.uhighlight.CustomPassageFormatter; +import org.apache.lucene.search.uhighlight.CustomSeparatorBreakIterator; import org.apache.lucene.search.uhighlight.CustomUnifiedHighlighter; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.CollectionUtil; @@ -96,9 +97,7 @@ public HighlightField highlight(HighlighterContext highlighterContext) { // breaks the text on, so we don't lose the distinction between the different values of a field and we // get back a snippet per value String fieldValue = mergeFieldValues(fieldValues, MULTIVAL_SEP_CHAR); - org.apache.lucene.search.postingshighlight.CustomSeparatorBreakIterator breakIterator = - new org.apache.lucene.search.postingshighlight - .CustomSeparatorBreakIterator(MULTIVAL_SEP_CHAR); + CustomSeparatorBreakIterator breakIterator = new CustomSeparatorBreakIterator(MULTIVAL_SEP_CHAR); highlighter = new CustomUnifiedHighlighter(searcher, analyzer, mapperHighlighterEntry.passageFormatter, field.fieldOptions().boundaryScannerLocale(), breakIterator, fieldValue, diff --git a/core/src/main/resources/org/elasticsearch/bootstrap/security.policy b/core/src/main/resources/org/elasticsearch/bootstrap/security.policy index f6ad88c957212..722a928f565ea 100644 --- a/core/src/main/resources/org/elasticsearch/bootstrap/security.policy +++ b/core/src/main/resources/org/elasticsearch/bootstrap/security.policy @@ -31,7 +31,7 @@ grant codeBase "${codebase.securesm-1.1.jar}" { //// Very special jar permissions: //// These are dangerous permissions that we don't want to grant to everything. -grant codeBase "${codebase.lucene-core-7.0.0-snapshot-a0aef2f.jar}" { +grant codeBase "${codebase.lucene-core-7.0.0-snapshot-92b1783.jar}" { // needed to allow MMapDirectory's "unmap hack" (die unmap hack, die) // java 8 package permission java.lang.RuntimePermission "accessClassInPackage.sun.misc"; @@ -42,7 +42,7 @@ grant codeBase "${codebase.lucene-core-7.0.0-snapshot-a0aef2f.jar}" { permission java.lang.RuntimePermission "accessDeclaredMembers"; }; -grant codeBase "${codebase.lucene-misc-7.0.0-snapshot-a0aef2f.jar}" { +grant codeBase "${codebase.lucene-misc-7.0.0-snapshot-92b1783.jar}" { // needed to allow shard shrinking to use hard-links if possible via lucenes HardlinkCopyDirectoryWrapper permission java.nio.file.LinkPermission "hard"; }; diff --git a/core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy b/core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy index 97e14b6994ac6..4f10cf6edbffa 100644 --- a/core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy +++ b/core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy @@ -33,7 +33,7 @@ grant codeBase "${codebase.securemock-1.2.jar}" { permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; }; -grant codeBase "${codebase.lucene-test-framework-7.0.0-snapshot-a0aef2f.jar}" { +grant codeBase "${codebase.lucene-test-framework-7.0.0-snapshot-92b1783.jar}" { // needed by RamUsageTester permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; // needed for testing hardlinks in StoreRecoveryTests since we install MockFS diff --git a/core/src/test/java/org/elasticsearch/indices/analyze/AnalyzeActionIT.java b/core/src/test/java/org/elasticsearch/indices/analyze/AnalyzeActionIT.java index ad51a5d694236..85787c2a3e242 100644 --- a/core/src/test/java/org/elasticsearch/indices/analyze/AnalyzeActionIT.java +++ b/core/src/test/java/org/elasticsearch/indices/analyze/AnalyzeActionIT.java @@ -26,7 +26,9 @@ import org.hamcrest.core.IsNull; import java.io.IOException; +import java.util.Arrays; import java.util.HashMap; +import java.util.HashSet; import java.util.Map; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; @@ -280,14 +282,10 @@ public void testDetailAnalyzeCustomAnalyzerWithNoIndex() throws Exception { assertThat(analyzeResponse.detail().tokenfilters()[0].getTokens()[2].getTerm(), equalTo("troubled")); String[] expectedAttributesKey = { "bytes", + "termFrequency", "positionLength"}; - assertThat(analyzeResponse.detail().tokenfilters()[0].getTokens()[2].getAttributes().size(), equalTo(expectedAttributesKey.length)); - Object extendedAttribute; - - for (String key : expectedAttributesKey) { - extendedAttribute = analyzeResponse.detail().tokenfilters()[0].getTokens()[2].getAttributes().get(key); - assertThat(extendedAttribute, notNullValue()); - } + assertThat(analyzeResponse.detail().tokenfilters()[0].getTokens()[2].getAttributes().keySet(), + equalTo(new HashSet<>(Arrays.asList(expectedAttributesKey)))); } public void testDetailAnalyzeWithMultiValues() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/search/basic/TransportTwoNodesSearchIT.java b/core/src/test/java/org/elasticsearch/search/basic/TransportTwoNodesSearchIT.java index ed70aa119f6a2..92488a69d6d60 100644 --- a/core/src/test/java/org/elasticsearch/search/basic/TransportTwoNodesSearchIT.java +++ b/core/src/test/java/org/elasticsearch/search/basic/TransportTwoNodesSearchIT.java @@ -126,8 +126,10 @@ public void testDfsQueryThenFetch() throws Exception { // to produce the same 8-bit norm for all docs here, so that // the tf is basically the entire score (assuming idf is fixed, which // it should be if dfs is working correctly) - for (int i = 1024; i < 1124; i++) { - index(Integer.toString(i - 1024), "test", i); + // With the current way of encoding norms, every length between 1048 and 1176 + // are encoded into the same byte + for (int i = 1048; i < 1148; i++) { + index(Integer.toString(i - 1048), "test", i); } refresh(); diff --git a/core/src/test/java/org/elasticsearch/search/functionscore/DecayFunctionScoreIT.java b/core/src/test/java/org/elasticsearch/search/functionscore/DecayFunctionScoreIT.java index 5f722a86a2364..96db5d44a76f0 100644 --- a/core/src/test/java/org/elasticsearch/search/functionscore/DecayFunctionScoreIT.java +++ b/core/src/test/java/org/elasticsearch/search/functionscore/DecayFunctionScoreIT.java @@ -273,14 +273,14 @@ public void testBoostModeSettingWorks() throws Exception { .setId("1") .setIndex("test") .setSource( - jsonBuilder().startObject().field("test", "value").startObject("loc").field("lat", 11).field("lon", 21).endObject() + jsonBuilder().startObject().field("test", "value value").startObject("loc").field("lat", 11).field("lon", 21).endObject() .endObject())); indexBuilders.add(client().prepareIndex() .setType("type1") .setId("2") .setIndex("test") .setSource( - jsonBuilder().startObject().field("test", "value value").startObject("loc").field("lat", 11).field("lon", 20) + jsonBuilder().startObject().field("test", "value").startObject("loc").field("lat", 11).field("lon", 20) .endObject().endObject())); indexRandom(true, false, indexBuilders); // force no dummy docs @@ -297,10 +297,19 @@ public void testBoostModeSettingWorks() throws Exception { SearchResponse sr = response.actionGet(); SearchHits sh = sr.getHits(); assertThat(sh.getTotalHits(), equalTo((long) (2))); - assertThat(sh.getAt(0).getId(), isOneOf("1")); + assertThat(sh.getAt(0).getId(), equalTo("1")); assertThat(sh.getAt(1).getId(), equalTo("2")); // Test Exp + response = client().search( + searchRequest().searchType(SearchType.QUERY_THEN_FETCH).source( + searchSource().query(termQuery("test", "value")))); + sr = response.actionGet(); + sh = sr.getHits(); + assertThat(sh.getTotalHits(), equalTo((long) (2))); + assertThat(sh.getAt(0).getId(), equalTo("1")); + assertThat(sh.getAt(1).getId(), equalTo("2")); + response = client().search( searchRequest().searchType(SearchType.QUERY_THEN_FETCH).source( searchSource().query( diff --git a/core/src/test/java/org/elasticsearch/search/functionscore/QueryRescorerIT.java b/core/src/test/java/org/elasticsearch/search/functionscore/QueryRescorerIT.java index 18db8cd539e0d..61292eceb370b 100644 --- a/core/src/test/java/org/elasticsearch/search/functionscore/QueryRescorerIT.java +++ b/core/src/test/java/org/elasticsearch/search/functionscore/QueryRescorerIT.java @@ -294,8 +294,8 @@ public void testSmallRescoreWindow() throws Exception { assertThat(searchResponse.getHits().getHits().length, equalTo(4)); assertHitCount(searchResponse, 4); assertThat(searchResponse.getHits().getMaxScore(), equalTo(searchResponse.getHits().getHits()[0].getScore())); - assertFirstHit(searchResponse, hasId("6")); - assertSecondHit(searchResponse, hasId("1")); + assertFirstHit(searchResponse, hasId("1")); + assertSecondHit(searchResponse, hasId("6")); assertThirdHit(searchResponse, hasId("3")); assertFourthHit(searchResponse, hasId("2")); } diff --git a/docs/reference/analysis/charfilters/pattern-replace-charfilter.asciidoc b/docs/reference/analysis/charfilters/pattern-replace-charfilter.asciidoc index e674f8bf0e7b4..8221ae7cf3f4f 100644 --- a/docs/reference/analysis/charfilters/pattern-replace-charfilter.asciidoc +++ b/docs/reference/analysis/charfilters/pattern-replace-charfilter.asciidoc @@ -241,13 +241,13 @@ The output from the above is: }, "hits": { "total": 1, - "max_score": 0.2824934, + "max_score": 0.2876821, "hits": [ { "_index": "my_index", "_type": "my_type", "_id": "1", - "_score": 0.2824934, + "_score": 0.2876821, "_source": { "text": "The fooBarBaz method" }, diff --git a/docs/reference/analysis/tokenizers/edgengram-tokenizer.asciidoc b/docs/reference/analysis/tokenizers/edgengram-tokenizer.asciidoc index 3ef526325e770..b43b4518b8d72 100644 --- a/docs/reference/analysis/tokenizers/edgengram-tokenizer.asciidoc +++ b/docs/reference/analysis/tokenizers/edgengram-tokenizer.asciidoc @@ -300,13 +300,13 @@ GET my_index/_search }, "hits": { "total": 1, - "max_score": 0.51623213, + "max_score": 0.5753642, "hits": [ { "_index": "my_index", "_type": "doc", "_id": "1", - "_score": 0.51623213, + "_score": 0.5753642, "_source": { "title": "Quick Foxes" } diff --git a/docs/reference/how-to/recipes.asciidoc b/docs/reference/how-to/recipes.asciidoc index 4d1a4b67a2bcb..913fb80bea652 100644 --- a/docs/reference/how-to/recipes.asciidoc +++ b/docs/reference/how-to/recipes.asciidoc @@ -88,13 +88,13 @@ GET index/_search }, "hits": { "total": 2, - "max_score": 0.25811607, + "max_score": 0.2876821, "hits": [ { "_index": "index", "_type": "type", "_id": "2", - "_score": 0.25811607, + "_score": 0.2876821, "_source": { "body": "A pair of skis" } @@ -103,7 +103,7 @@ GET index/_search "_index": "index", "_type": "type", "_id": "1", - "_score": 0.25811607, + "_score": 0.2876821, "_source": { "body": "Ski resort" } @@ -145,13 +145,13 @@ GET index/_search }, "hits": { "total": 1, - "max_score": 0.25811607, + "max_score": 0.2876821, "hits": [ { "_index": "index", "_type": "type", "_id": "1", - "_score": 0.25811607, + "_score": 0.2876821, "_source": { "body": "Ski resort" } @@ -201,13 +201,13 @@ GET index/_search }, "hits": { "total": 1, - "max_score": 0.25811607, + "max_score": 0.2876821, "hits": [ { "_index": "index", "_type": "type", "_id": "1", - "_score": 0.25811607, + "_score": 0.2876821, "_source": { "body": "Ski resort" } diff --git a/docs/reference/query-dsl/percolate-query.asciidoc b/docs/reference/query-dsl/percolate-query.asciidoc index 296255d2ded67..c89b6802c0488 100644 --- a/docs/reference/query-dsl/percolate-query.asciidoc +++ b/docs/reference/query-dsl/percolate-query.asciidoc @@ -90,13 +90,13 @@ The above request will yield the following response: }, "hits": { "total": 1, - "max_score": 0.5716521, + "max_score": 0.5753642, "hits": [ { <1> "_index": "my-index", "_type": "doc", "_id": "1", - "_score": 0.5716521, + "_score": 0.5753642, "_source": { "query": { "match": { @@ -291,13 +291,13 @@ This will yield the following response. }, "hits": { "total": 2, - "max_score": 0.5446649, + "max_score": 0.5753642, "hits": [ { "_index": "my-index", "_type": "doc", "_id": "4", - "_score": 0.5446649, + "_score": 0.5753642, "_source": { "query": { "match": { @@ -315,7 +315,7 @@ This will yield the following response. "_index": "my-index", "_type": "doc", "_id": "3", - "_score": 0.5446649, + "_score": 0.5753642, "_source": { "query": { "match": { diff --git a/docs/reference/search/explain.asciidoc b/docs/reference/search/explain.asciidoc index 61a8ac641c072..04ff66f6c37a8 100644 --- a/docs/reference/search/explain.asciidoc +++ b/docs/reference/search/explain.asciidoc @@ -35,11 +35,11 @@ This will yield the following result: "_id": "0", "matched": true, "explanation": { - "value": 1.55077, + "value": 1.6943599, "description": "weight(message:elasticsearch in 0) [PerFieldSimilarity], result of:", "details": [ { - "value": 1.55077, + "value": 1.6943599, "description": "score(doc=0,freq=1.0 = termFreq=1.0\n), product of:", "details": [ { @@ -59,7 +59,7 @@ This will yield the following result: ] }, { - "value": 1.1186441, + "value": 1.2222223, "description": "tfNorm, computed as (freq * (k1 + 1)) / (freq + k1 * (1 - b + b * fieldLength / avgFieldLength)) from:", "details": [ { @@ -83,7 +83,7 @@ This will yield the following result: "details": [] }, { - "value": 4.0, + "value": 3.0, "description": "fieldLength", "details": [] } diff --git a/docs/reference/search/request/highlighting.asciidoc b/docs/reference/search/request/highlighting.asciidoc index 2f3d395b21fd1..73cf54046b659 100644 --- a/docs/reference/search/request/highlighting.asciidoc +++ b/docs/reference/search/request/highlighting.asciidoc @@ -457,13 +457,13 @@ Response: ... "hits": { "total": 1, - "max_score": 1.4818809, + "max_score": 1.601195, "hits": [ { "_index": "twitter", "_type": "tweet", "_id": "1", - "_score": 1.4818809, + "_score": 1.601195, "_source": { "user": "test", "message": "some message with the number 1", @@ -513,13 +513,13 @@ Response: ... "hits": { "total": 1, - "max_score": 1.4818809, + "max_score": 1.601195, "hits": [ { "_index": "twitter", "_type": "tweet", "_id": "1", - "_score": 1.4818809, + "_score": 1.601195, "_source": { "user": "test", "message": "some message with the number 1", diff --git a/docs/reference/search/request/inner-hits.asciidoc b/docs/reference/search/request/inner-hits.asciidoc index 2ad06233d7d8c..793452f32ab3b 100644 --- a/docs/reference/search/request/inner-hits.asciidoc +++ b/docs/reference/search/request/inner-hits.asciidoc @@ -137,26 +137,26 @@ An example of a response snippet that could be generated from the above search r ..., "hits": { "total": 1, - "max_score": 0.9651416, + "max_score": 1.0444683, "hits": [ { "_index": "test", "_type": "doc", "_id": "1", - "_score": 0.9651416, + "_score": 1.0444683, "_source": ..., "inner_hits": { "comments": { <1> "hits": { "total": 1, - "max_score": 0.9651416, + "max_score": 1.0444683, "hits": [ { "_nested": { "field": "comments", "offset": 1 }, - "_score": 0.9651416, + "_score": 1.0444683, "_source": { "author": "nik9000", "text": "words words words" @@ -263,26 +263,26 @@ Response not included in text but tested for completeness sake. ..., "hits": { "total": 1, - "max_score": 0.9651416, + "max_score": 1.0444683, "hits": [ { "_index": "test", "_type": "doc", "_id": "1", - "_score": 0.9651416, + "_score": 1.0444683, "_source": ..., "inner_hits": { "comments": { <1> "hits": { "total": 1, - "max_score": 0.9651416, + "max_score": 1.0444683, "hits": [ { "_nested": { "field": "comments", "offset": 1 }, - "_score": 0.9651416, + "_score": 1.0444683, "fields": { "comments.text": [ "words words words" diff --git a/modules/lang-expression/licenses/lucene-expressions-7.0.0-snapshot-92b1783.jar.sha1 b/modules/lang-expression/licenses/lucene-expressions-7.0.0-snapshot-92b1783.jar.sha1 new file mode 100644 index 0000000000000..671513e5ac8bb --- /dev/null +++ b/modules/lang-expression/licenses/lucene-expressions-7.0.0-snapshot-92b1783.jar.sha1 @@ -0,0 +1 @@ +bcd4b2c3308a284f4d93400a47cb324a3c729aed \ No newline at end of file diff --git a/modules/lang-expression/licenses/lucene-expressions-7.0.0-snapshot-a0aef2f.jar.sha1 b/modules/lang-expression/licenses/lucene-expressions-7.0.0-snapshot-a0aef2f.jar.sha1 deleted file mode 100644 index 361094b626cbd..0000000000000 --- a/modules/lang-expression/licenses/lucene-expressions-7.0.0-snapshot-a0aef2f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -e7bfe234a793f8a1f0556def4e526d040ed636c8 \ No newline at end of file diff --git a/plugins/analysis-icu/licenses/lucene-analyzers-icu-7.0.0-snapshot-92b1783.jar.sha1 b/plugins/analysis-icu/licenses/lucene-analyzers-icu-7.0.0-snapshot-92b1783.jar.sha1 new file mode 100644 index 0000000000000..2fb8c48b9784a --- /dev/null +++ b/plugins/analysis-icu/licenses/lucene-analyzers-icu-7.0.0-snapshot-92b1783.jar.sha1 @@ -0,0 +1 @@ +4e74b475f888a6b488fa1f30362f2a537330d911 \ No newline at end of file diff --git a/plugins/analysis-icu/licenses/lucene-analyzers-icu-7.0.0-snapshot-a0aef2f.jar.sha1 b/plugins/analysis-icu/licenses/lucene-analyzers-icu-7.0.0-snapshot-a0aef2f.jar.sha1 deleted file mode 100644 index 6cebd9da7b217..0000000000000 --- a/plugins/analysis-icu/licenses/lucene-analyzers-icu-7.0.0-snapshot-a0aef2f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -18e2a8a8096b13e191882aa77134e27c68e60372 \ No newline at end of file diff --git a/plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-7.0.0-snapshot-92b1783.jar.sha1 b/plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-7.0.0-snapshot-92b1783.jar.sha1 new file mode 100644 index 0000000000000..44a4e31bd60a4 --- /dev/null +++ b/plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-7.0.0-snapshot-92b1783.jar.sha1 @@ -0,0 +1 @@ +d51c247bd2a0e053db07eaec25464eae2f7f4360 \ No newline at end of file diff --git a/plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-7.0.0-snapshot-a0aef2f.jar.sha1 b/plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-7.0.0-snapshot-a0aef2f.jar.sha1 deleted file mode 100644 index 56ee53168d8d9..0000000000000 --- a/plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-7.0.0-snapshot-a0aef2f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -236924d9d6da7e4f36535e957e9a506b4e737302 \ No newline at end of file diff --git a/plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-7.0.0-snapshot-92b1783.jar.sha1 b/plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-7.0.0-snapshot-92b1783.jar.sha1 new file mode 100644 index 0000000000000..8640a7ed4a58c --- /dev/null +++ b/plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-7.0.0-snapshot-92b1783.jar.sha1 @@ -0,0 +1 @@ +b01fe0b5d64e2c6dbeba51bfcc38c20b86f7f71a \ No newline at end of file diff --git a/plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-7.0.0-snapshot-a0aef2f.jar.sha1 b/plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-7.0.0-snapshot-a0aef2f.jar.sha1 deleted file mode 100644 index 1296ea368286b..0000000000000 --- a/plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-7.0.0-snapshot-a0aef2f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -f8b0087d03c65253122cbc3b3419f346204e80fe \ No newline at end of file diff --git a/plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-7.0.0-snapshot-92b1783.jar.sha1 b/plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-7.0.0-snapshot-92b1783.jar.sha1 new file mode 100644 index 0000000000000..49ea47c2718c8 --- /dev/null +++ b/plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-7.0.0-snapshot-92b1783.jar.sha1 @@ -0,0 +1 @@ +c38eb6f68ca095314568176f8d183b284f1fcc17 \ No newline at end of file diff --git a/plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-7.0.0-snapshot-a0aef2f.jar.sha1 b/plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-7.0.0-snapshot-a0aef2f.jar.sha1 deleted file mode 100644 index ec0c34c2d1bab..0000000000000 --- a/plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-7.0.0-snapshot-a0aef2f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -3e5102270f6c10a3b33e402ed5f8722ec2a1a338 \ No newline at end of file diff --git a/plugins/analysis-stempel/licenses/lucene-analyzers-stempel-7.0.0-snapshot-92b1783.jar.sha1 b/plugins/analysis-stempel/licenses/lucene-analyzers-stempel-7.0.0-snapshot-92b1783.jar.sha1 new file mode 100644 index 0000000000000..26547efd259e7 --- /dev/null +++ b/plugins/analysis-stempel/licenses/lucene-analyzers-stempel-7.0.0-snapshot-92b1783.jar.sha1 @@ -0,0 +1 @@ +e9f595188eb3d977e242ab02692c1845c69efdaf \ No newline at end of file diff --git a/plugins/analysis-stempel/licenses/lucene-analyzers-stempel-7.0.0-snapshot-a0aef2f.jar.sha1 b/plugins/analysis-stempel/licenses/lucene-analyzers-stempel-7.0.0-snapshot-a0aef2f.jar.sha1 deleted file mode 100644 index cfbd6ca2982d7..0000000000000 --- a/plugins/analysis-stempel/licenses/lucene-analyzers-stempel-7.0.0-snapshot-a0aef2f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -6d9730ec654bdcf943a4018a5695e7954159ceda \ No newline at end of file diff --git a/plugins/analysis-ukrainian/licenses/lucene-analyzers-morfologik-7.0.0-snapshot-92b1783.jar.sha1 b/plugins/analysis-ukrainian/licenses/lucene-analyzers-morfologik-7.0.0-snapshot-92b1783.jar.sha1 new file mode 100644 index 0000000000000..4267c1c7e419c --- /dev/null +++ b/plugins/analysis-ukrainian/licenses/lucene-analyzers-morfologik-7.0.0-snapshot-92b1783.jar.sha1 @@ -0,0 +1 @@ +dab621b2c6b28c322a90668c2d43d14a354997ae \ No newline at end of file diff --git a/plugins/analysis-ukrainian/licenses/lucene-analyzers-morfologik-7.0.0-snapshot-a0aef2f.jar.sha1 b/plugins/analysis-ukrainian/licenses/lucene-analyzers-morfologik-7.0.0-snapshot-a0aef2f.jar.sha1 deleted file mode 100644 index 5c15573f5bd54..0000000000000 --- a/plugins/analysis-ukrainian/licenses/lucene-analyzers-morfologik-7.0.0-snapshot-a0aef2f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -26d01ae0d15243b30874b2cb609be5d041890459 \ No newline at end of file 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 a3fe52d005c24..0c2a29224f8e7 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 @@ -262,6 +262,9 @@ private static String toCamelCase(String s) { .put("daterecognizer", Void.class) // for token filters that generate bad offsets, which are now rejected since Lucene 7 .put("fixbrokenoffsets", Void.class) + // should we expose it, or maybe think about higher level integration of the + // fake term frequency feature (LUCENE-7854) + .put("delimitedtermfrequency", Void.class) .immutableMap(); diff --git a/test/framework/src/test/java/org/elasticsearch/test/test/ESTestCaseTests.java b/test/framework/src/test/java/org/elasticsearch/test/test/ESTestCaseTests.java index bf4c786c110f1..ff5c193dc0db9 100644 --- a/test/framework/src/test/java/org/elasticsearch/test/test/ESTestCaseTests.java +++ b/test/framework/src/test/java/org/elasticsearch/test/test/ESTestCaseTests.java @@ -56,7 +56,8 @@ public void testExpectThrows() { }); fail("expected assertion error"); } catch (AssertionFailedError assertFailed) { - assertEquals("Unexpected exception type, expected IllegalArgumentException", assertFailed.getMessage()); + assertEquals("Unexpected exception type, expected IllegalArgumentException but got java.lang.IllegalStateException: bad state", + assertFailed.getMessage()); assertNotNull(assertFailed.getCause()); assertEquals("bad state", assertFailed.getCause().getMessage()); } @@ -66,7 +67,8 @@ public void testExpectThrows() { fail("expected assertion error"); } catch (AssertionFailedError assertFailed) { assertNull(assertFailed.getCause()); - assertEquals("Expected exception IllegalArgumentException", assertFailed.getMessage()); + assertEquals("Expected exception IllegalArgumentException but no exception was thrown", + assertFailed.getMessage()); } } From 5b61e19b39e6522a06c5705329d20b73a0bec410 Mon Sep 17 00:00:00 2001 From: Adrien Grand Date: Wed, 14 Jun 2017 16:30:18 +0200 Subject: [PATCH 2/3] Line length --- .../search/functionscore/DecayFunctionScoreIT.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/test/java/org/elasticsearch/search/functionscore/DecayFunctionScoreIT.java b/core/src/test/java/org/elasticsearch/search/functionscore/DecayFunctionScoreIT.java index 96db5d44a76f0..b43e479031d85 100644 --- a/core/src/test/java/org/elasticsearch/search/functionscore/DecayFunctionScoreIT.java +++ b/core/src/test/java/org/elasticsearch/search/functionscore/DecayFunctionScoreIT.java @@ -273,8 +273,8 @@ public void testBoostModeSettingWorks() throws Exception { .setId("1") .setIndex("test") .setSource( - jsonBuilder().startObject().field("test", "value value").startObject("loc").field("lat", 11).field("lon", 21).endObject() - .endObject())); + jsonBuilder().startObject().field("test", "value value").startObject("loc").field("lat", 11).field("lon", 21) + .endObject().endObject())); indexBuilders.add(client().prepareIndex() .setType("type1") .setId("2") From 5b93d9da7e9da52a8127f1951dbdc592d21ae4b3 Mon Sep 17 00:00:00 2001 From: Adrien Grand Date: Wed, 14 Jun 2017 17:42:20 +0200 Subject: [PATCH 3/3] Remove unfixable test --- .../search/functionscore/QueryRescorerIT.java | 35 ------------------- 1 file changed, 35 deletions(-) diff --git a/core/src/test/java/org/elasticsearch/search/functionscore/QueryRescorerIT.java b/core/src/test/java/org/elasticsearch/search/functionscore/QueryRescorerIT.java index 61292eceb370b..2b188adeb7087 100644 --- a/core/src/test/java/org/elasticsearch/search/functionscore/QueryRescorerIT.java +++ b/core/src/test/java/org/elasticsearch/search/functionscore/QueryRescorerIT.java @@ -392,29 +392,6 @@ private static void assertEquivalent(String query, SearchResponse plain, SearchR } } - private static void assertEquivalentOrSubstringMatch(String query, SearchResponse plain, SearchResponse rescored) { - assertNoFailures(plain); - assertNoFailures(rescored); - SearchHits leftHits = plain.getHits(); - SearchHits rightHits = rescored.getHits(); - assertThat(leftHits.getTotalHits(), equalTo(rightHits.getTotalHits())); - assertThat(leftHits.getHits().length, equalTo(rightHits.getHits().length)); - SearchHit[] hits = leftHits.getHits(); - SearchHit[] otherHits = rightHits.getHits(); - if (!hits[0].getId().equals(otherHits[0].getId())) { - assertThat(((String) otherHits[0].getSourceAsMap().get("field1")).contains(query), equalTo(true)); - } else { - Arrays.sort(hits, searchHitsComparator); - Arrays.sort(otherHits, searchHitsComparator); - for (int i = 0; i < hits.length; i++) { - if (hits[i].getScore() == hits[hits.length-1].getScore()) { - return; // we need to cut off here since this is the tail of the queue and we might not have fetched enough docs - } - assertThat(query, hits[i].getId(), equalTo(rightHits.getHits()[i].getId())); - } - } - } - // forces QUERY_THEN_FETCH because of https://github.com/elastic/elasticsearch/issues/4829 public void testEquivalence() throws Exception { // no dummy docs since merges can change scores while we run queries. @@ -461,18 +438,6 @@ public void testEquivalence() throws Exception { .actionGet(); // check equivalence assertEquivalent(query, plain, rescored); - - rescored = client() - .prepareSearch() - .setSearchType(SearchType.QUERY_THEN_FETCH) - .setPreference("test") // ensure we hit the same shards for tie-breaking - .setQuery(QueryBuilders.matchQuery("field1", query).operator(Operator.OR)) - .setFrom(0) - .setSize(resultSize) - .setRescorer(queryRescorer(matchPhraseQuery("field1", intToEnglish).slop(0)) - .setQueryWeight(1.0f).setRescoreQueryWeight(1.0f), 2 * rescoreWindow).execute().actionGet(); - // check equivalence or if the first match differs we check if the phrase is a substring of the top doc - assertEquivalentOrSubstringMatch(intToEnglish, plain, rescored); } }