From 0b396a0c5e5f5a463ccc629a7826a78389b4557f Mon Sep 17 00:00:00 2001 From: Luca Cavanna Date: Tue, 15 Jan 2019 16:42:55 +0100 Subject: [PATCH] Restore assertion on discount overlaps in SimilarityTests This assertion was commented out as the getDiscountOverlaps getter was missing from LegacyBm25Similarity. That has been fixed in lucene. --- .../org/elasticsearch/index/similarity/SimilarityTests.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/src/test/java/org/elasticsearch/index/similarity/SimilarityTests.java b/server/src/test/java/org/elasticsearch/index/similarity/SimilarityTests.java index fd5a77665fecd..d1fae9acceb67 100644 --- a/server/src/test/java/org/elasticsearch/index/similarity/SimilarityTests.java +++ b/server/src/test/java/org/elasticsearch/index/similarity/SimilarityTests.java @@ -99,8 +99,7 @@ public void testResolveSimilaritiesFromMapping_bm25() throws IOException { LegacyBM25Similarity similarity = (LegacyBM25Similarity) mapperService.fullName("field1").similarity().get(); assertThat(similarity.getK1(), equalTo(2.0f)); assertThat(similarity.getB(), equalTo(0.5f)); - // TODO: re-enable when we switch back to BM25Similarity - // assertThat(similarity.getDiscountOverlaps(), equalTo(false)); + assertThat(similarity.getDiscountOverlaps(), equalTo(false)); } public void testResolveSimilaritiesFromMapping_boolean() throws IOException {