mirror of https://github.com/apache/lucene.git
LUCENE-8010: GroupingSearchTest assumes longer fields = lower scores
This commit is contained in:
parent
c1030eeb74
commit
6dd9dbf275
|
@ -31,6 +31,7 @@ import org.apache.lucene.search.IndexSearcher;
|
|||
import org.apache.lucene.search.Query;
|
||||
import org.apache.lucene.search.Sort;
|
||||
import org.apache.lucene.search.TermQuery;
|
||||
import org.apache.lucene.search.similarities.BM25Similarity;
|
||||
import org.apache.lucene.store.Directory;
|
||||
import org.apache.lucene.util.BytesRef;
|
||||
import org.apache.lucene.util.LuceneTestCase;
|
||||
|
@ -115,6 +116,7 @@ public class GroupingSearchTest extends LuceneTestCase {
|
|||
w.addDocument(doc);
|
||||
|
||||
IndexSearcher indexSearcher = newSearcher(w.getReader());
|
||||
indexSearcher.setSimilarity(new BM25Similarity());
|
||||
w.close();
|
||||
|
||||
Sort groupSort = Sort.RELEVANCE;
|
||||
|
|
Loading…
Reference in New Issue