LUCENE-7384: Tweak SpanWeight.buildSimWeight to reuse the existing similarity.

This commit is contained in:
David Smiley 2016-07-19 12:45:28 -04:00
parent abb81e4ded
commit 180f9562aa
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}
/**