From d5dc05f69eea6095c9a19815c3bc38097207af09 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Tue, 2 Feb 2016 22:53:39 -0500 Subject: [PATCH 1/5] Upgrade to lucene 5.5.0-snapshot-1725675 --- .../elasticsearch/gradle/BuildPlugin.groovy | 2 +- buildSrc/version.properties | 2 +- .../common/lucene/all/AllField.java | 2 +- .../index/mapper/core/DoubleFieldMapper.java | 2 +- .../index/mapper/core/FloatFieldMapper.java | 2 +- .../index/mapper/core/IntegerFieldMapper.java | 2 +- .../index/mapper/core/LongFieldMapper.java | 2 +- .../index/mapper/core/NumberFieldMapper.java | 2 +- .../index/mapper/core/ShortFieldMapper.java | 2 +- .../similarity/DFISimilarityProvider.java | 32 +++++++++++++++++-- .../similarity/DFRSimilarityProvider.java | 12 +++---- .../elasticsearch/bootstrap/security.policy | 4 +-- .../bootstrap/test-framework.policy | 2 +- .../common/lucene/uid/VersionsTests.java | 2 +- .../query/GeoPolygonQueryBuilderTests.java | 1 + .../index/similarity/SimilarityTests.java | 5 ++- ...ers-common-5.5.0-snapshot-1725675.jar.sha1 | 1 - ...ers-common-5.5.0-snapshot-4de5f1d.jar.sha1 | 1 + ...ard-codecs-5.5.0-snapshot-1725675.jar.sha1 | 1 - ...ard-codecs-5.5.0-snapshot-4de5f1d.jar.sha1 | 1 + ...ucene-core-5.5.0-snapshot-1725675.jar.sha1 | 1 - ...ucene-core-5.5.0-snapshot-4de5f1d.jar.sha1 | 1 + ...e-grouping-5.5.0-snapshot-1725675.jar.sha1 | 1 - ...e-grouping-5.5.0-snapshot-4de5f1d.jar.sha1 | 1 + ...ighlighter-5.5.0-snapshot-1725675.jar.sha1 | 1 - ...ighlighter-5.5.0-snapshot-4de5f1d.jar.sha1 | 1 + ...ucene-join-5.5.0-snapshot-1725675.jar.sha1 | 1 - ...ucene-join-5.5.0-snapshot-4de5f1d.jar.sha1 | 1 + ...ene-memory-5.5.0-snapshot-1725675.jar.sha1 | 1 - ...ene-memory-5.5.0-snapshot-4de5f1d.jar.sha1 | 1 + ...ucene-misc-5.5.0-snapshot-1725675.jar.sha1 | 1 - ...ucene-misc-5.5.0-snapshot-4de5f1d.jar.sha1 | 1 + ...ne-queries-5.5.0-snapshot-1725675.jar.sha1 | 1 - ...ne-queries-5.5.0-snapshot-4de5f1d.jar.sha1 | 1 + ...ueryparser-5.5.0-snapshot-1725675.jar.sha1 | 1 - ...ueryparser-5.5.0-snapshot-4de5f1d.jar.sha1 | 1 + ...ne-sandbox-5.5.0-snapshot-1725675.jar.sha1 | 1 - ...ne-sandbox-5.5.0-snapshot-4de5f1d.jar.sha1 | 1 + ...ne-spatial-5.5.0-snapshot-1725675.jar.sha1 | 1 - ...ne-spatial-5.5.0-snapshot-4de5f1d.jar.sha1 | 1 + ...-spatial3d-5.5.0-snapshot-1725675.jar.sha1 | 1 - ...-spatial3d-5.5.0-snapshot-4de5f1d.jar.sha1 | 1 + ...ne-suggest-5.5.0-snapshot-1725675.jar.sha1 | 1 - ...ne-suggest-5.5.0-snapshot-4de5f1d.jar.sha1 | 1 + .../index-modules/similarity.asciidoc | 8 +++-- ...xpressions-5.5.0-snapshot-1725675.jar.sha1 | 1 - ...xpressions-5.5.0-snapshot-4de5f1d.jar.sha1 | 1 + ...lyzers-icu-5.5.0-snapshot-1725675.jar.sha1 | 1 - ...lyzers-icu-5.5.0-snapshot-4de5f1d.jar.sha1 | 1 + ...s-kuromoji-5.5.0-snapshot-1725675.jar.sha1 | 1 - ...s-kuromoji-5.5.0-snapshot-4de5f1d.jar.sha1 | 1 + ...s-phonetic-5.5.0-snapshot-1725675.jar.sha1 | 1 - ...s-phonetic-5.5.0-snapshot-4de5f1d.jar.sha1 | 1 + ...rs-smartcn-5.5.0-snapshot-1725675.jar.sha1 | 1 - ...rs-smartcn-5.5.0-snapshot-4de5f1d.jar.sha1 | 1 + ...rs-stempel-5.5.0-snapshot-1725675.jar.sha1 | 1 - ...rs-stempel-5.5.0-snapshot-4de5f1d.jar.sha1 | 1 + 57 files changed, 80 insertions(+), 44 deletions(-) delete mode 100644 distribution/licenses/lucene-analyzers-common-5.5.0-snapshot-1725675.jar.sha1 create mode 100644 distribution/licenses/lucene-analyzers-common-5.5.0-snapshot-4de5f1d.jar.sha1 delete mode 100644 distribution/licenses/lucene-backward-codecs-5.5.0-snapshot-1725675.jar.sha1 create mode 100644 distribution/licenses/lucene-backward-codecs-5.5.0-snapshot-4de5f1d.jar.sha1 delete mode 100644 distribution/licenses/lucene-core-5.5.0-snapshot-1725675.jar.sha1 create mode 100644 distribution/licenses/lucene-core-5.5.0-snapshot-4de5f1d.jar.sha1 delete mode 100644 distribution/licenses/lucene-grouping-5.5.0-snapshot-1725675.jar.sha1 create mode 100644 distribution/licenses/lucene-grouping-5.5.0-snapshot-4de5f1d.jar.sha1 delete mode 100644 distribution/licenses/lucene-highlighter-5.5.0-snapshot-1725675.jar.sha1 create mode 100644 distribution/licenses/lucene-highlighter-5.5.0-snapshot-4de5f1d.jar.sha1 delete mode 100644 distribution/licenses/lucene-join-5.5.0-snapshot-1725675.jar.sha1 create mode 100644 distribution/licenses/lucene-join-5.5.0-snapshot-4de5f1d.jar.sha1 delete mode 100644 distribution/licenses/lucene-memory-5.5.0-snapshot-1725675.jar.sha1 create mode 100644 distribution/licenses/lucene-memory-5.5.0-snapshot-4de5f1d.jar.sha1 delete mode 100644 distribution/licenses/lucene-misc-5.5.0-snapshot-1725675.jar.sha1 create mode 100644 distribution/licenses/lucene-misc-5.5.0-snapshot-4de5f1d.jar.sha1 delete mode 100644 distribution/licenses/lucene-queries-5.5.0-snapshot-1725675.jar.sha1 create mode 100644 distribution/licenses/lucene-queries-5.5.0-snapshot-4de5f1d.jar.sha1 delete mode 100644 distribution/licenses/lucene-queryparser-5.5.0-snapshot-1725675.jar.sha1 create mode 100644 distribution/licenses/lucene-queryparser-5.5.0-snapshot-4de5f1d.jar.sha1 delete mode 100644 distribution/licenses/lucene-sandbox-5.5.0-snapshot-1725675.jar.sha1 create mode 100644 distribution/licenses/lucene-sandbox-5.5.0-snapshot-4de5f1d.jar.sha1 delete mode 100644 distribution/licenses/lucene-spatial-5.5.0-snapshot-1725675.jar.sha1 create mode 100644 distribution/licenses/lucene-spatial-5.5.0-snapshot-4de5f1d.jar.sha1 delete mode 100644 distribution/licenses/lucene-spatial3d-5.5.0-snapshot-1725675.jar.sha1 create mode 100644 distribution/licenses/lucene-spatial3d-5.5.0-snapshot-4de5f1d.jar.sha1 delete mode 100644 distribution/licenses/lucene-suggest-5.5.0-snapshot-1725675.jar.sha1 create mode 100644 distribution/licenses/lucene-suggest-5.5.0-snapshot-4de5f1d.jar.sha1 delete mode 100644 modules/lang-expression/licenses/lucene-expressions-5.5.0-snapshot-1725675.jar.sha1 create mode 100644 modules/lang-expression/licenses/lucene-expressions-5.5.0-snapshot-4de5f1d.jar.sha1 delete mode 100644 plugins/analysis-icu/licenses/lucene-analyzers-icu-5.5.0-snapshot-1725675.jar.sha1 create mode 100644 plugins/analysis-icu/licenses/lucene-analyzers-icu-5.5.0-snapshot-4de5f1d.jar.sha1 delete mode 100644 plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-5.5.0-snapshot-1725675.jar.sha1 create mode 100644 plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-5.5.0-snapshot-4de5f1d.jar.sha1 delete mode 100644 plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-5.5.0-snapshot-1725675.jar.sha1 create mode 100644 plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-5.5.0-snapshot-4de5f1d.jar.sha1 delete mode 100644 plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-5.5.0-snapshot-1725675.jar.sha1 create mode 100644 plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-5.5.0-snapshot-4de5f1d.jar.sha1 delete mode 100644 plugins/analysis-stempel/licenses/lucene-analyzers-stempel-5.5.0-snapshot-1725675.jar.sha1 create mode 100644 plugins/analysis-stempel/licenses/lucene-analyzers-stempel-5.5.0-snapshot-4de5f1d.jar.sha1 diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy index ce2ecaff8cf..7dde047ad30 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy @@ -289,7 +289,7 @@ class BuildPlugin implements Plugin { String luceneVersion = VersionProperties.lucene if (luceneVersion.contains('-snapshot')) { // extract the revision number from the version with a regex matcher - String revision = (luceneVersion =~ /\w+-snapshot-(\d+)/)[0][1] + String revision = (luceneVersion =~ /\w+-snapshot-([a-z0-9]+)/)[0][1] repos.maven { name 'lucene-snapshots' url "http://s3.amazonaws.com/download.elasticsearch.org/lucenesnapshots/${revision}" diff --git a/buildSrc/version.properties b/buildSrc/version.properties index c62fdf7d500..1c5b1e724fd 100644 --- a/buildSrc/version.properties +++ b/buildSrc/version.properties @@ -1,5 +1,5 @@ elasticsearch = 3.0.0-SNAPSHOT -lucene = 5.5.0-snapshot-1725675 +lucene = 5.5.0-snapshot-4de5f1d # optional dependencies spatial4j = 0.5 diff --git a/core/src/main/java/org/elasticsearch/common/lucene/all/AllField.java b/core/src/main/java/org/elasticsearch/common/lucene/all/AllField.java index f6d0a13c396..3eb47742b11 100644 --- a/core/src/main/java/org/elasticsearch/common/lucene/all/AllField.java +++ b/core/src/main/java/org/elasticsearch/common/lucene/all/AllField.java @@ -63,7 +63,7 @@ public class AllField extends Field { } @Override - public TokenStream tokenStream(Analyzer analyzer, TokenStream previous) throws IOException { + public TokenStream tokenStream(Analyzer analyzer, TokenStream previous) { try { allEntries.reset(); // reset the all entries, just in case it was read already if (allEntries.customBoost() && fieldType().indexOptions().compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0) { diff --git a/core/src/main/java/org/elasticsearch/index/mapper/core/DoubleFieldMapper.java b/core/src/main/java/org/elasticsearch/index/mapper/core/DoubleFieldMapper.java index 0497fcd394c..6c3f24d479e 100644 --- a/core/src/main/java/org/elasticsearch/index/mapper/core/DoubleFieldMapper.java +++ b/core/src/main/java/org/elasticsearch/index/mapper/core/DoubleFieldMapper.java @@ -320,7 +320,7 @@ public class DoubleFieldMapper extends NumberFieldMapper { } @Override - public TokenStream tokenStream(Analyzer analyzer, TokenStream previous) throws IOException { + public TokenStream tokenStream(Analyzer analyzer, TokenStream previous) { if (fieldType().indexOptions() != IndexOptions.NONE) { return getCachedStream().setDoubleValue(number); } diff --git a/core/src/main/java/org/elasticsearch/index/mapper/core/FloatFieldMapper.java b/core/src/main/java/org/elasticsearch/index/mapper/core/FloatFieldMapper.java index 9aa690e0515..31c22d626ee 100644 --- a/core/src/main/java/org/elasticsearch/index/mapper/core/FloatFieldMapper.java +++ b/core/src/main/java/org/elasticsearch/index/mapper/core/FloatFieldMapper.java @@ -332,7 +332,7 @@ public class FloatFieldMapper extends NumberFieldMapper { } @Override - public TokenStream tokenStream(Analyzer analyzer, TokenStream previous) throws IOException { + public TokenStream tokenStream(Analyzer analyzer, TokenStream previous) { if (fieldType().indexOptions() != IndexOptions.NONE) { return getCachedStream().setFloatValue(number); } diff --git a/core/src/main/java/org/elasticsearch/index/mapper/core/IntegerFieldMapper.java b/core/src/main/java/org/elasticsearch/index/mapper/core/IntegerFieldMapper.java index 343e0b8611c..27315ad042a 100644 --- a/core/src/main/java/org/elasticsearch/index/mapper/core/IntegerFieldMapper.java +++ b/core/src/main/java/org/elasticsearch/index/mapper/core/IntegerFieldMapper.java @@ -340,7 +340,7 @@ public class IntegerFieldMapper extends NumberFieldMapper { } @Override - public TokenStream tokenStream(Analyzer analyzer, TokenStream previous) throws IOException { + public TokenStream tokenStream(Analyzer analyzer, TokenStream previous) { if (fieldType().indexOptions() != IndexOptions.NONE) { return getCachedStream().setIntValue(number); } diff --git a/core/src/main/java/org/elasticsearch/index/mapper/core/LongFieldMapper.java b/core/src/main/java/org/elasticsearch/index/mapper/core/LongFieldMapper.java index 70261d7dc43..984dc3fed53 100644 --- a/core/src/main/java/org/elasticsearch/index/mapper/core/LongFieldMapper.java +++ b/core/src/main/java/org/elasticsearch/index/mapper/core/LongFieldMapper.java @@ -323,7 +323,7 @@ public class LongFieldMapper extends NumberFieldMapper { } @Override - public TokenStream tokenStream(Analyzer analyzer, TokenStream previous) throws IOException { + public TokenStream tokenStream(Analyzer analyzer, TokenStream previous) { if (fieldType().indexOptions() != IndexOptions.NONE) { return getCachedStream().setLongValue(number); } diff --git a/core/src/main/java/org/elasticsearch/index/mapper/core/NumberFieldMapper.java b/core/src/main/java/org/elasticsearch/index/mapper/core/NumberFieldMapper.java index 5f829fdecea..90fb20ef827 100644 --- a/core/src/main/java/org/elasticsearch/index/mapper/core/NumberFieldMapper.java +++ b/core/src/main/java/org/elasticsearch/index/mapper/core/NumberFieldMapper.java @@ -408,7 +408,7 @@ public abstract class NumberFieldMapper extends FieldMapper implements AllFieldM } @Override - public TokenStream tokenStream(Analyzer analyzer, TokenStream reuse) throws IOException { + public TokenStream tokenStream(Analyzer analyzer, TokenStream reuse) { return null; } diff --git a/core/src/main/java/org/elasticsearch/index/mapper/core/ShortFieldMapper.java b/core/src/main/java/org/elasticsearch/index/mapper/core/ShortFieldMapper.java index fdd7ab34819..01bd16d2c1e 100644 --- a/core/src/main/java/org/elasticsearch/index/mapper/core/ShortFieldMapper.java +++ b/core/src/main/java/org/elasticsearch/index/mapper/core/ShortFieldMapper.java @@ -332,7 +332,7 @@ public class ShortFieldMapper extends NumberFieldMapper { } @Override - public TokenStream tokenStream(Analyzer analyzer, TokenStream previous) throws IOException { + public TokenStream tokenStream(Analyzer analyzer, TokenStream previous) { if (fieldType().indexOptions() != IndexOptions.NONE) { return getCachedStream().setIntValue(number); } diff --git a/core/src/main/java/org/elasticsearch/index/similarity/DFISimilarityProvider.java b/core/src/main/java/org/elasticsearch/index/similarity/DFISimilarityProvider.java index 30b07a06c34..54b0aab7588 100644 --- a/core/src/main/java/org/elasticsearch/index/similarity/DFISimilarityProvider.java +++ b/core/src/main/java/org/elasticsearch/index/similarity/DFISimilarityProvider.java @@ -20,30 +20,58 @@ package org.elasticsearch.index.similarity; import org.apache.lucene.search.similarities.DFISimilarity; +import org.apache.lucene.search.similarities.Independence; +import org.apache.lucene.search.similarities.IndependenceChiSquared; +import org.apache.lucene.search.similarities.IndependenceSaturated; +import org.apache.lucene.search.similarities.IndependenceStandardized; import org.apache.lucene.search.similarities.Similarity; import org.elasticsearch.common.settings.Settings; +import java.util.HashMap; +import java.util.Map; + +import static java.util.Collections.unmodifiableMap; + /** * {@link SimilarityProvider} for the {@link DFISimilarity}. *

* Configuration options available: *

* @see DFISimilarity For more information about configuration */ public class DFISimilarityProvider extends AbstractSimilarityProvider { + // the "basic models" of divergence from independence + private static final Map INDEPENDENCE_MEASURES; + static { + Map measures = new HashMap<>(); + measures.put("standardized", new IndependenceStandardized()); + measures.put("saturated", new IndependenceSaturated()); + measures.put("chisquared", new IndependenceChiSquared()); + INDEPENDENCE_MEASURES = unmodifiableMap(measures); + } private final DFISimilarity similarity; public DFISimilarityProvider(String name, Settings settings) { super(name); boolean discountOverlaps = settings.getAsBoolean("discount_overlaps", true); - - this.similarity = new DFISimilarity(); + Independence measure = parseIndependence(settings); + this.similarity = new DFISimilarity(measure); this.similarity.setDiscountOverlaps(discountOverlaps); } + private Independence parseIndependence(Settings settings) { + String name = settings.get("independence_measure"); + Independence measure = INDEPENDENCE_MEASURES.get(name); + if (measure == null) { + throw new IllegalArgumentException("Unsupported IndependenceMeasure [" + name + "]"); + } + return measure; + } + @Override public Similarity get() { return similarity; diff --git a/core/src/main/java/org/elasticsearch/index/similarity/DFRSimilarityProvider.java b/core/src/main/java/org/elasticsearch/index/similarity/DFRSimilarityProvider.java index 782eed2e6a1..2aeb685de34 100644 --- a/core/src/main/java/org/elasticsearch/index/similarity/DFRSimilarityProvider.java +++ b/core/src/main/java/org/elasticsearch/index/similarity/DFRSimilarityProvider.java @@ -52,8 +52,8 @@ import static java.util.Collections.unmodifiableMap; * @see DFRSimilarity For more information about configuration */ public class DFRSimilarityProvider extends AbstractSimilarityProvider { - private static final Map MODEL_CACHE; - private static final Map EFFECT_CACHE; + private static final Map BASIC_MODELS; + private static final Map AFTER_EFFECTS; static { Map models = new HashMap<>(); @@ -64,13 +64,13 @@ public class DFRSimilarityProvider extends AbstractSimilarityProvider { models.put("in", new BasicModelIn()); models.put("ine", new BasicModelIne()); models.put("p", new BasicModelP()); - MODEL_CACHE = unmodifiableMap(models); + BASIC_MODELS = unmodifiableMap(models); Map effects = new HashMap<>(); effects.put("no", new AfterEffect.NoAfterEffect()); effects.put("b", new AfterEffectB()); effects.put("l", new AfterEffectL()); - EFFECT_CACHE = unmodifiableMap(effects); + AFTER_EFFECTS = unmodifiableMap(effects); } private final DFRSimilarity similarity; @@ -91,7 +91,7 @@ public class DFRSimilarityProvider extends AbstractSimilarityProvider { */ protected BasicModel parseBasicModel(Settings settings) { String basicModel = settings.get("basic_model"); - BasicModel model = MODEL_CACHE.get(basicModel); + BasicModel model = BASIC_MODELS.get(basicModel); if (model == null) { throw new IllegalArgumentException("Unsupported BasicModel [" + basicModel + "]"); } @@ -106,7 +106,7 @@ public class DFRSimilarityProvider extends AbstractSimilarityProvider { */ protected AfterEffect parseAfterEffect(Settings settings) { String afterEffect = settings.get("after_effect"); - AfterEffect effect = EFFECT_CACHE.get(afterEffect); + AfterEffect effect = AFTER_EFFECTS.get(afterEffect); if (effect == null) { throw new IllegalArgumentException("Unsupported AfterEffect [" + afterEffect + "]"); } diff --git a/core/src/main/resources/org/elasticsearch/bootstrap/security.policy b/core/src/main/resources/org/elasticsearch/bootstrap/security.policy index 2228d0365f7..ac7f849cda3 100644 --- a/core/src/main/resources/org/elasticsearch/bootstrap/security.policy +++ b/core/src/main/resources/org/elasticsearch/bootstrap/security.policy @@ -31,8 +31,8 @@ grant codeBase "${codebase.securesm-1.0.jar}" { //// Very special jar permissions: //// These are dangerous permissions that we don't want to grant to everything. -grant codeBase "${codebase.lucene-core-5.5.0-snapshot-1725675.jar}" { - // needed to allow MMapDirectory's "unmap hack" +grant codeBase "${codebase.lucene-core-5.5.0-snapshot-4de5f1d.jar}" { + // needed to allow MMapDirectory's "unmap hack" (die unmap hack, die) permission java.lang.RuntimePermission "accessClassInPackage.sun.misc"; permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; // NOTE: also needed for RAMUsageEstimator size calculations 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 408fdcd855e..629eb75cf4a 100644 --- a/core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy +++ b/core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy @@ -31,7 +31,7 @@ grant codeBase "${codebase.securemock-1.2.jar}" { permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; }; -grant codeBase "${codebase.lucene-test-framework-5.5.0-snapshot-1725675.jar}" { +grant codeBase "${codebase.lucene-test-framework-5.5.0-snapshot-4de5f1d.jar}" { // needed by RamUsageTester permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; }; diff --git a/core/src/test/java/org/elasticsearch/common/lucene/uid/VersionsTests.java b/core/src/test/java/org/elasticsearch/common/lucene/uid/VersionsTests.java index 7539d2aa635..1221445e8a6 100644 --- a/core/src/test/java/org/elasticsearch/common/lucene/uid/VersionsTests.java +++ b/core/src/test/java/org/elasticsearch/common/lucene/uid/VersionsTests.java @@ -209,7 +209,7 @@ public class VersionsTests extends ESTestCase { this.version = version; } @Override - public TokenStream tokenStream(Analyzer analyzer, TokenStream reuse) throws IOException { + public TokenStream tokenStream(Analyzer analyzer, TokenStream reuse) { return new TokenStream() { boolean finished = true; final CharTermAttribute term = addAttribute(CharTermAttribute.class); diff --git a/core/src/test/java/org/elasticsearch/index/query/GeoPolygonQueryBuilderTests.java b/core/src/test/java/org/elasticsearch/index/query/GeoPolygonQueryBuilderTests.java index 348d5d6b048..88d67f9756e 100644 --- a/core/src/test/java/org/elasticsearch/index/query/GeoPolygonQueryBuilderTests.java +++ b/core/src/test/java/org/elasticsearch/index/query/GeoPolygonQueryBuilderTests.java @@ -110,6 +110,7 @@ public class GeoPolygonQueryBuilderTests extends AbstractQueryTestCase 0); super.testToQuery(); diff --git a/core/src/test/java/org/elasticsearch/index/similarity/SimilarityTests.java b/core/src/test/java/org/elasticsearch/index/similarity/SimilarityTests.java index 926ea49ba4b..29fb9b9a04f 100644 --- a/core/src/test/java/org/elasticsearch/index/similarity/SimilarityTests.java +++ b/core/src/test/java/org/elasticsearch/index/similarity/SimilarityTests.java @@ -27,6 +27,7 @@ import org.apache.lucene.search.similarities.BasicModelG; import org.apache.lucene.search.similarities.DFRSimilarity; import org.apache.lucene.search.similarities.DistributionSPL; import org.apache.lucene.search.similarities.IBSimilarity; +import org.apache.lucene.search.similarities.IndependenceChiSquared; import org.apache.lucene.search.similarities.LMDirichletSimilarity; import org.apache.lucene.search.similarities.LMJelinekMercerSimilarity; import org.apache.lucene.search.similarities.LambdaTTF; @@ -167,12 +168,14 @@ public class SimilarityTests extends ESSingleNodeTestCase { Settings indexSettings = Settings.settingsBuilder() .put("index.similarity.my_similarity.type", "DFI") + .put("index.similarity.my_similarity.independence_measure", "chisquared") .build(); IndexService indexService = createIndex("foo", indexSettings); DocumentMapper documentMapper = indexService.mapperService().documentMapperParser().parse("type", new CompressedXContent(mapping)); MappedFieldType fieldType = documentMapper.mappers().getMapper("field1").fieldType(); assertThat(fieldType.similarity(), instanceOf(DFISimilarityProvider.class)); - assertThat(fieldType.similarity().get(), instanceOf(DFISimilarity.class)); + DFISimilarity similarity = (DFISimilarity) fieldType.similarity().get(); + assertThat(similarity.getIndependence(), instanceOf(IndependenceChiSquared.class)); } public void testResolveSimilaritiesFromMapping_LMDirichlet() throws IOException { diff --git a/distribution/licenses/lucene-analyzers-common-5.5.0-snapshot-1725675.jar.sha1 b/distribution/licenses/lucene-analyzers-common-5.5.0-snapshot-1725675.jar.sha1 deleted file mode 100644 index bb0dbacbfbf..00000000000 --- a/distribution/licenses/lucene-analyzers-common-5.5.0-snapshot-1725675.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -528a695bb8882dbc3d9866335ac1bb3905cba4e3 \ No newline at end of file diff --git a/distribution/licenses/lucene-analyzers-common-5.5.0-snapshot-4de5f1d.jar.sha1 b/distribution/licenses/lucene-analyzers-common-5.5.0-snapshot-4de5f1d.jar.sha1 new file mode 100644 index 00000000000..162824e5b15 --- /dev/null +++ b/distribution/licenses/lucene-analyzers-common-5.5.0-snapshot-4de5f1d.jar.sha1 @@ -0,0 +1 @@ +c1a6adaf97f1f341b311ddf050d2b19c79fb1945 \ No newline at end of file diff --git a/distribution/licenses/lucene-backward-codecs-5.5.0-snapshot-1725675.jar.sha1 b/distribution/licenses/lucene-backward-codecs-5.5.0-snapshot-1725675.jar.sha1 deleted file mode 100644 index ec23e314ecb..00000000000 --- a/distribution/licenses/lucene-backward-codecs-5.5.0-snapshot-1725675.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -3fb1bcc1001a10b74ae91848c8558572891c1409 \ No newline at end of file diff --git a/distribution/licenses/lucene-backward-codecs-5.5.0-snapshot-4de5f1d.jar.sha1 b/distribution/licenses/lucene-backward-codecs-5.5.0-snapshot-4de5f1d.jar.sha1 new file mode 100644 index 00000000000..56a223db820 --- /dev/null +++ b/distribution/licenses/lucene-backward-codecs-5.5.0-snapshot-4de5f1d.jar.sha1 @@ -0,0 +1 @@ +52e20edd7a5fc828cd19bb49a603d57d7d4f2cd7 \ No newline at end of file diff --git a/distribution/licenses/lucene-core-5.5.0-snapshot-1725675.jar.sha1 b/distribution/licenses/lucene-core-5.5.0-snapshot-1725675.jar.sha1 deleted file mode 100644 index fc810e4e240..00000000000 --- a/distribution/licenses/lucene-core-5.5.0-snapshot-1725675.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -9eff7f186877882f8b68f031f610bd7ab8c5c1fb \ No newline at end of file diff --git a/distribution/licenses/lucene-core-5.5.0-snapshot-4de5f1d.jar.sha1 b/distribution/licenses/lucene-core-5.5.0-snapshot-4de5f1d.jar.sha1 new file mode 100644 index 00000000000..edb26e275b1 --- /dev/null +++ b/distribution/licenses/lucene-core-5.5.0-snapshot-4de5f1d.jar.sha1 @@ -0,0 +1 @@ +c28b1829a7510a59316761f0805072cf7441df24 \ No newline at end of file diff --git a/distribution/licenses/lucene-grouping-5.5.0-snapshot-1725675.jar.sha1 b/distribution/licenses/lucene-grouping-5.5.0-snapshot-1725675.jar.sha1 deleted file mode 100644 index 28851461aa1..00000000000 --- a/distribution/licenses/lucene-grouping-5.5.0-snapshot-1725675.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -6e6253936522f27b35ba4d8485806f517ef2df45 \ No newline at end of file diff --git a/distribution/licenses/lucene-grouping-5.5.0-snapshot-4de5f1d.jar.sha1 b/distribution/licenses/lucene-grouping-5.5.0-snapshot-4de5f1d.jar.sha1 new file mode 100644 index 00000000000..b5d09d3ca8b --- /dev/null +++ b/distribution/licenses/lucene-grouping-5.5.0-snapshot-4de5f1d.jar.sha1 @@ -0,0 +1 @@ +c2e5d4357f2dad4aff99b9457ea916d259cb09f4 \ No newline at end of file diff --git a/distribution/licenses/lucene-highlighter-5.5.0-snapshot-1725675.jar.sha1 b/distribution/licenses/lucene-highlighter-5.5.0-snapshot-1725675.jar.sha1 deleted file mode 100644 index 9d434fde909..00000000000 --- a/distribution/licenses/lucene-highlighter-5.5.0-snapshot-1725675.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -8a313aa34b0070d3f7d48005e7677b680db1b09d \ No newline at end of file diff --git a/distribution/licenses/lucene-highlighter-5.5.0-snapshot-4de5f1d.jar.sha1 b/distribution/licenses/lucene-highlighter-5.5.0-snapshot-4de5f1d.jar.sha1 new file mode 100644 index 00000000000..f43270c764f --- /dev/null +++ b/distribution/licenses/lucene-highlighter-5.5.0-snapshot-4de5f1d.jar.sha1 @@ -0,0 +1 @@ +112959bececacfeaa72533ac94cca3d3d164550b \ No newline at end of file diff --git a/distribution/licenses/lucene-join-5.5.0-snapshot-1725675.jar.sha1 b/distribution/licenses/lucene-join-5.5.0-snapshot-1725675.jar.sha1 deleted file mode 100644 index 9a7a013720b..00000000000 --- a/distribution/licenses/lucene-join-5.5.0-snapshot-1725675.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -bf4c5a17cfb265d321ef4cfb0f3d7c1a6a6651de \ No newline at end of file diff --git a/distribution/licenses/lucene-join-5.5.0-snapshot-4de5f1d.jar.sha1 b/distribution/licenses/lucene-join-5.5.0-snapshot-4de5f1d.jar.sha1 new file mode 100644 index 00000000000..80f9298ad1d --- /dev/null +++ b/distribution/licenses/lucene-join-5.5.0-snapshot-4de5f1d.jar.sha1 @@ -0,0 +1 @@ +975f42fac508bc999386955e449f5b91d123b569 \ No newline at end of file diff --git a/distribution/licenses/lucene-memory-5.5.0-snapshot-1725675.jar.sha1 b/distribution/licenses/lucene-memory-5.5.0-snapshot-1725675.jar.sha1 deleted file mode 100644 index c5ecb0f0970..00000000000 --- a/distribution/licenses/lucene-memory-5.5.0-snapshot-1725675.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -2713a319d0aa696c65a32a36fda830bc482a5880 \ No newline at end of file diff --git a/distribution/licenses/lucene-memory-5.5.0-snapshot-4de5f1d.jar.sha1 b/distribution/licenses/lucene-memory-5.5.0-snapshot-4de5f1d.jar.sha1 new file mode 100644 index 00000000000..25261388b00 --- /dev/null +++ b/distribution/licenses/lucene-memory-5.5.0-snapshot-4de5f1d.jar.sha1 @@ -0,0 +1 @@ +3744a71c00220ef98dfcffc8265325709224fee5 \ No newline at end of file diff --git a/distribution/licenses/lucene-misc-5.5.0-snapshot-1725675.jar.sha1 b/distribution/licenses/lucene-misc-5.5.0-snapshot-1725675.jar.sha1 deleted file mode 100644 index 6d5665b5671..00000000000 --- a/distribution/licenses/lucene-misc-5.5.0-snapshot-1725675.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -88251ecdbf877c15a94d4013aa5157f5b5ce4cea \ No newline at end of file diff --git a/distribution/licenses/lucene-misc-5.5.0-snapshot-4de5f1d.jar.sha1 b/distribution/licenses/lucene-misc-5.5.0-snapshot-4de5f1d.jar.sha1 new file mode 100644 index 00000000000..b4832785994 --- /dev/null +++ b/distribution/licenses/lucene-misc-5.5.0-snapshot-4de5f1d.jar.sha1 @@ -0,0 +1 @@ +e1fb855fc6711bc977587aecf42060d958f9f32b \ No newline at end of file diff --git a/distribution/licenses/lucene-queries-5.5.0-snapshot-1725675.jar.sha1 b/distribution/licenses/lucene-queries-5.5.0-snapshot-1725675.jar.sha1 deleted file mode 100644 index aa97465d97b..00000000000 --- a/distribution/licenses/lucene-queries-5.5.0-snapshot-1725675.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -bf9e522244c7c4eee6c3bcc3212ff057f7b88000 \ No newline at end of file diff --git a/distribution/licenses/lucene-queries-5.5.0-snapshot-4de5f1d.jar.sha1 b/distribution/licenses/lucene-queries-5.5.0-snapshot-4de5f1d.jar.sha1 new file mode 100644 index 00000000000..88f7841b967 --- /dev/null +++ b/distribution/licenses/lucene-queries-5.5.0-snapshot-4de5f1d.jar.sha1 @@ -0,0 +1 @@ +74914a9410a5f8a43e72ff77532ae481c61f6384 \ No newline at end of file diff --git a/distribution/licenses/lucene-queryparser-5.5.0-snapshot-1725675.jar.sha1 b/distribution/licenses/lucene-queryparser-5.5.0-snapshot-1725675.jar.sha1 deleted file mode 100644 index 9942349f5a4..00000000000 --- a/distribution/licenses/lucene-queryparser-5.5.0-snapshot-1725675.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -12d71cf10a4b79231dc488af16d723dfca5ab64b \ No newline at end of file diff --git a/distribution/licenses/lucene-queryparser-5.5.0-snapshot-4de5f1d.jar.sha1 b/distribution/licenses/lucene-queryparser-5.5.0-snapshot-4de5f1d.jar.sha1 new file mode 100644 index 00000000000..43311609747 --- /dev/null +++ b/distribution/licenses/lucene-queryparser-5.5.0-snapshot-4de5f1d.jar.sha1 @@ -0,0 +1 @@ +f3a5c7242ecee80e80e5da0ff328897452cbec77 \ No newline at end of file diff --git a/distribution/licenses/lucene-sandbox-5.5.0-snapshot-1725675.jar.sha1 b/distribution/licenses/lucene-sandbox-5.5.0-snapshot-1725675.jar.sha1 deleted file mode 100644 index f05a9b50d57..00000000000 --- a/distribution/licenses/lucene-sandbox-5.5.0-snapshot-1725675.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -f903d67d042904527a7e2e8a75c55afe36a04251 \ No newline at end of file diff --git a/distribution/licenses/lucene-sandbox-5.5.0-snapshot-4de5f1d.jar.sha1 b/distribution/licenses/lucene-sandbox-5.5.0-snapshot-4de5f1d.jar.sha1 new file mode 100644 index 00000000000..a1c02df0e24 --- /dev/null +++ b/distribution/licenses/lucene-sandbox-5.5.0-snapshot-4de5f1d.jar.sha1 @@ -0,0 +1 @@ +054bd6d6e3762af6828ae29805e2c6ccd136aaf8 \ No newline at end of file diff --git a/distribution/licenses/lucene-spatial-5.5.0-snapshot-1725675.jar.sha1 b/distribution/licenses/lucene-spatial-5.5.0-snapshot-1725675.jar.sha1 deleted file mode 100644 index 8c53d4662e5..00000000000 --- a/distribution/licenses/lucene-spatial-5.5.0-snapshot-1725675.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -2f5758bbcf97048ab62d2d4ae73867d06f1ed03f \ No newline at end of file diff --git a/distribution/licenses/lucene-spatial-5.5.0-snapshot-4de5f1d.jar.sha1 b/distribution/licenses/lucene-spatial-5.5.0-snapshot-4de5f1d.jar.sha1 new file mode 100644 index 00000000000..f7940115911 --- /dev/null +++ b/distribution/licenses/lucene-spatial-5.5.0-snapshot-4de5f1d.jar.sha1 @@ -0,0 +1 @@ +2580c4ccce1258580dbf8035e9e4ff1cf73b1cff \ No newline at end of file diff --git a/distribution/licenses/lucene-spatial3d-5.5.0-snapshot-1725675.jar.sha1 b/distribution/licenses/lucene-spatial3d-5.5.0-snapshot-1725675.jar.sha1 deleted file mode 100644 index 252156ad4af..00000000000 --- a/distribution/licenses/lucene-spatial3d-5.5.0-snapshot-1725675.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -2cc29e4658be151658fac6e5ed7915982b6de861 \ No newline at end of file diff --git a/distribution/licenses/lucene-spatial3d-5.5.0-snapshot-4de5f1d.jar.sha1 b/distribution/licenses/lucene-spatial3d-5.5.0-snapshot-4de5f1d.jar.sha1 new file mode 100644 index 00000000000..37f825eb26e --- /dev/null +++ b/distribution/licenses/lucene-spatial3d-5.5.0-snapshot-4de5f1d.jar.sha1 @@ -0,0 +1 @@ +56ddb993dda8b6c0d68d64b1d4be6e088df29669 \ No newline at end of file diff --git a/distribution/licenses/lucene-suggest-5.5.0-snapshot-1725675.jar.sha1 b/distribution/licenses/lucene-suggest-5.5.0-snapshot-1725675.jar.sha1 deleted file mode 100644 index e7154958580..00000000000 --- a/distribution/licenses/lucene-suggest-5.5.0-snapshot-1725675.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -f490a09ca056aba42e8751a469ef114df64aae0d \ No newline at end of file diff --git a/distribution/licenses/lucene-suggest-5.5.0-snapshot-4de5f1d.jar.sha1 b/distribution/licenses/lucene-suggest-5.5.0-snapshot-4de5f1d.jar.sha1 new file mode 100644 index 00000000000..b039cbf4d46 --- /dev/null +++ b/distribution/licenses/lucene-suggest-5.5.0-snapshot-4de5f1d.jar.sha1 @@ -0,0 +1 @@ +bce01a0ba74c0df5caaf2b112537024371d03df4 \ No newline at end of file diff --git a/docs/reference/index-modules/similarity.asciidoc b/docs/reference/index-modules/similarity.asciidoc index a5d95ffa3fa..3d993a3a6eb 100644 --- a/docs/reference/index-modules/similarity.asciidoc +++ b/docs/reference/index-modules/similarity.asciidoc @@ -112,7 +112,11 @@ Type name: `DFR` ==== DFI similarity Similarity that implements the http://trec.nist.gov/pubs/trec21/papers/irra.web.nb.pdf[divergence from independence] -model (normalized chi-squared distance) +model. +This similarity has the following options: + +[horizontal] +`independence_measure`:: Possible values `standardized`, `saturated`, `chisquared`. [float] [[ib]] @@ -121,7 +125,7 @@ model (normalized chi-squared distance) http://lucene.apache.org/core/5_2_1/core/org/apache/lucene/search/similarities/IBSimilarity.html[Information based model] . The algorithm is based on the concept that the information content in any symbolic 'distribution' sequence is primarily determined by the repetitive usage of its basic elements. -For written texts this challenge would correspond to comparing the writing styles of diferent authors. +For written texts this challenge would correspond to comparing the writing styles of different authors. This similarity has the following options: [horizontal] diff --git a/modules/lang-expression/licenses/lucene-expressions-5.5.0-snapshot-1725675.jar.sha1 b/modules/lang-expression/licenses/lucene-expressions-5.5.0-snapshot-1725675.jar.sha1 deleted file mode 100644 index 86909f14f82..00000000000 --- a/modules/lang-expression/licenses/lucene-expressions-5.5.0-snapshot-1725675.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -31db8e49e4089772eae8ab2db0ac59bab6fbcd2f \ No newline at end of file diff --git a/modules/lang-expression/licenses/lucene-expressions-5.5.0-snapshot-4de5f1d.jar.sha1 b/modules/lang-expression/licenses/lucene-expressions-5.5.0-snapshot-4de5f1d.jar.sha1 new file mode 100644 index 00000000000..2de57e08624 --- /dev/null +++ b/modules/lang-expression/licenses/lucene-expressions-5.5.0-snapshot-4de5f1d.jar.sha1 @@ -0,0 +1 @@ +477099ede788272484648ecd05d39d8745c74d6e \ No newline at end of file diff --git a/plugins/analysis-icu/licenses/lucene-analyzers-icu-5.5.0-snapshot-1725675.jar.sha1 b/plugins/analysis-icu/licenses/lucene-analyzers-icu-5.5.0-snapshot-1725675.jar.sha1 deleted file mode 100644 index f40f87d5286..00000000000 --- a/plugins/analysis-icu/licenses/lucene-analyzers-icu-5.5.0-snapshot-1725675.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -4504d3d993f094ed70585124df56c2be86c2615a \ No newline at end of file diff --git a/plugins/analysis-icu/licenses/lucene-analyzers-icu-5.5.0-snapshot-4de5f1d.jar.sha1 b/plugins/analysis-icu/licenses/lucene-analyzers-icu-5.5.0-snapshot-4de5f1d.jar.sha1 new file mode 100644 index 00000000000..c0a48ca4b3b --- /dev/null +++ b/plugins/analysis-icu/licenses/lucene-analyzers-icu-5.5.0-snapshot-4de5f1d.jar.sha1 @@ -0,0 +1 @@ +dc33b8449a6423132bf618bb1d32f464d191686d \ No newline at end of file diff --git a/plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-5.5.0-snapshot-1725675.jar.sha1 b/plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-5.5.0-snapshot-1725675.jar.sha1 deleted file mode 100644 index c54e995c417..00000000000 --- a/plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-5.5.0-snapshot-1725675.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -15555d41d27bb398b6736be85a5eca4ca224b85d \ No newline at end of file diff --git a/plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-5.5.0-snapshot-4de5f1d.jar.sha1 b/plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-5.5.0-snapshot-4de5f1d.jar.sha1 new file mode 100644 index 00000000000..c3deab027b7 --- /dev/null +++ b/plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-5.5.0-snapshot-4de5f1d.jar.sha1 @@ -0,0 +1 @@ +d71ffab4f99835d863cd4b7b280469e62a98db61 \ No newline at end of file diff --git a/plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-5.5.0-snapshot-1725675.jar.sha1 b/plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-5.5.0-snapshot-1725675.jar.sha1 deleted file mode 100644 index e14685f7ace..00000000000 --- a/plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-5.5.0-snapshot-1725675.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -9d43a338338a6c88e8071a0e3eeb51f4d9d0364a \ No newline at end of file diff --git a/plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-5.5.0-snapshot-4de5f1d.jar.sha1 b/plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-5.5.0-snapshot-4de5f1d.jar.sha1 new file mode 100644 index 00000000000..beca1c6f1b1 --- /dev/null +++ b/plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-5.5.0-snapshot-4de5f1d.jar.sha1 @@ -0,0 +1 @@ +30a9da299d3e4190833aebd07e814ce8fb9e9f78 \ No newline at end of file diff --git a/plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-5.5.0-snapshot-1725675.jar.sha1 b/plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-5.5.0-snapshot-1725675.jar.sha1 deleted file mode 100644 index 505e90d11b1..00000000000 --- a/plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-5.5.0-snapshot-1725675.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -b66c95032c5ca41ce7b85519c64aab4e9a233f78 \ No newline at end of file diff --git a/plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-5.5.0-snapshot-4de5f1d.jar.sha1 b/plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-5.5.0-snapshot-4de5f1d.jar.sha1 new file mode 100644 index 00000000000..7908b9cdab9 --- /dev/null +++ b/plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-5.5.0-snapshot-4de5f1d.jar.sha1 @@ -0,0 +1 @@ +a5f2374bc9180d842e823b681726ae2663ab1ebd \ No newline at end of file diff --git a/plugins/analysis-stempel/licenses/lucene-analyzers-stempel-5.5.0-snapshot-1725675.jar.sha1 b/plugins/analysis-stempel/licenses/lucene-analyzers-stempel-5.5.0-snapshot-1725675.jar.sha1 deleted file mode 100644 index c9102990806..00000000000 --- a/plugins/analysis-stempel/licenses/lucene-analyzers-stempel-5.5.0-snapshot-1725675.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -4f41bacd77ce372f10f2c57ab516b2ce9aa71173 \ No newline at end of file diff --git a/plugins/analysis-stempel/licenses/lucene-analyzers-stempel-5.5.0-snapshot-4de5f1d.jar.sha1 b/plugins/analysis-stempel/licenses/lucene-analyzers-stempel-5.5.0-snapshot-4de5f1d.jar.sha1 new file mode 100644 index 00000000000..7b68617f3b8 --- /dev/null +++ b/plugins/analysis-stempel/licenses/lucene-analyzers-stempel-5.5.0-snapshot-4de5f1d.jar.sha1 @@ -0,0 +1 @@ +7d0ae501ad604447e02206f86e6592bcafd6a3f1 \ No newline at end of file From a1edf7320507698e85da878a06a1abcb4fe88167 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Tue, 2 Feb 2016 22:54:36 -0500 Subject: [PATCH 2/5] Revert "Test awaits Lucene snapshot upgrade" This reverts commit e6a5e79ede39b7a9c1ba4d372b63438a18aea113. --- .../elasticsearch/bwcompat/OldIndexBackwardsCompatibilityIT.java | 1 - 1 file changed, 1 deletion(-) diff --git a/core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityIT.java b/core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityIT.java index d23e11e2fb3..b5b1f955ae0 100644 --- a/core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityIT.java +++ b/core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityIT.java @@ -279,7 +279,6 @@ public class OldIndexBackwardsCompatibilityIT extends ESIntegTestCase { } } - @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/16373") public void testOldIndexes() throws Exception { setupCluster(); From bca0c88df38f0920896ce83c24bcae7fbec5b3eb Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Tue, 2 Feb 2016 23:03:38 -0500 Subject: [PATCH 3/5] Fix versions to match reality --- core/src/main/java/org/elasticsearch/Version.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/Version.java b/core/src/main/java/org/elasticsearch/Version.java index 330ce5eb99e..bcd59d5c35a 100644 --- a/core/src/main/java/org/elasticsearch/Version.java +++ b/core/src/main/java/org/elasticsearch/Version.java @@ -283,11 +283,11 @@ public class Version { public static final int V_2_1_3_ID = 2010399; public static final Version V_2_1_3 = new Version(V_2_1_3_ID, true, org.apache.lucene.util.Version.LUCENE_5_3_1); public static final int V_2_2_0_ID = 2020099; - public static final Version V_2_2_0 = new Version(V_2_2_0_ID, false, org.apache.lucene.util.Version.LUCENE_5_4_0); + public static final Version V_2_2_0 = new Version(V_2_2_0_ID, false, org.apache.lucene.util.Version.LUCENE_5_4_1); public static final int V_2_2_1_ID = 2020199; - public static final Version V_2_2_1 = new Version(V_2_2_1_ID, true, org.apache.lucene.util.Version.LUCENE_5_4_0); + public static final Version V_2_2_1 = new Version(V_2_2_1_ID, true, org.apache.lucene.util.Version.LUCENE_5_4_1); public static final int V_2_3_0_ID = 2030099; - public static final Version V_2_3_0 = new Version(V_2_3_0_ID, true, org.apache.lucene.util.Version.LUCENE_5_4_0); + public static final Version V_2_3_0 = new Version(V_2_3_0_ID, true, org.apache.lucene.util.Version.LUCENE_5_5_0); public static final int V_3_0_0_ID = 3000099; public static final Version V_3_0_0 = new Version(V_3_0_0_ID, true, org.apache.lucene.util.Version.LUCENE_5_5_0); public static final Version CURRENT = V_3_0_0; From 0b474c6cfca81cd3934fe286e48de1655e0d1446 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Tue, 2 Feb 2016 21:32:14 -0500 Subject: [PATCH 4/5] Shard state action request logging This commit modifies the string representation of a shard state action request. The issue being addressed is that the previous logging would log "failure: [Unknown]" for shard started actions but this just leads to confusion that there is a failure but its cause is unknown. Closes #16396 --- .../cluster/action/shard/ShardStateAction.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/cluster/action/shard/ShardStateAction.java b/core/src/main/java/org/elasticsearch/cluster/action/shard/ShardStateAction.java index fa703881bb2..5ee449f2834 100644 --- a/core/src/main/java/org/elasticsearch/cluster/action/shard/ShardStateAction.java +++ b/core/src/main/java/org/elasticsearch/cluster/action/shard/ShardStateAction.java @@ -435,13 +435,14 @@ public class ShardStateAction extends AbstractComponent { @Override public String toString() { - return String.format( - Locale.ROOT, - "failed shard [%s], source shard [%s], message [%s], failure [%s]", - shardRouting, - sourceShardRouting, - message, - ExceptionsHelper.detailedMessage(failure)); + List components = new ArrayList<>(4); + components.add("failed shard [" + shardRouting + "]"); + components.add("source shard [" + sourceShardRouting + "]"); + components.add("message [" + message + "]"); + if (failure != null) { + components.add("failure [" + ExceptionsHelper.detailedMessage(failure) + "]"); + } + return String.join(", ", components); } } From eb9bdd5f8ad9ba2f8cf35dc845c1dc139501ea6a Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Wed, 3 Feb 2016 06:56:01 -0500 Subject: [PATCH 5/5] Shard state action request logging --- .../elasticsearch/cluster/action/shard/ShardStateAction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/elasticsearch/cluster/action/shard/ShardStateAction.java b/core/src/main/java/org/elasticsearch/cluster/action/shard/ShardStateAction.java index 5ee449f2834..c7f39015c18 100644 --- a/core/src/main/java/org/elasticsearch/cluster/action/shard/ShardStateAction.java +++ b/core/src/main/java/org/elasticsearch/cluster/action/shard/ShardStateAction.java @@ -436,7 +436,7 @@ public class ShardStateAction extends AbstractComponent { @Override public String toString() { List components = new ArrayList<>(4); - components.add("failed shard [" + shardRouting + "]"); + components.add("target shard [" + shardRouting + "]"); components.add("source shard [" + sourceShardRouting + "]"); components.add("message [" + message + "]"); if (failure != null) {