From 180f9562aa9c1e271d8dce48ac5695d0612bf808 Mon Sep 17 00:00:00 2001 From: David Smiley Date: Tue, 19 Jul 2016 12:45:28 -0400 Subject: [PATCH] LUCENE-7384: Tweak SpanWeight.buildSimWeight to reuse the existing similarity. --- .../src/java/org/apache/lucene/search/spans/SpanWeight.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lucene/core/src/java/org/apache/lucene/search/spans/SpanWeight.java b/lucene/core/src/java/org/apache/lucene/search/spans/SpanWeight.java index c0b231ecf03..4d081722899 100644 --- a/lucene/core/src/java/org/apache/lucene/search/spans/SpanWeight.java +++ b/lucene/core/src/java/org/apache/lucene/search/spans/SpanWeight.java @@ -99,7 +99,7 @@ public abstract class SpanWeight extends Weight { i++; } CollectionStatistics collectionStats = searcher.collectionStatistics(query.getField()); - return searcher.getSimilarity(true).computeWeight(boost, collectionStats, termStats); + return similarity.computeWeight(boost, collectionStats, termStats); } /**