[TEST] use length-norm as the tie-breaker in BlendedTermQueryTest

This commit is contained in:
Simon Willnauer 2014-04-01 20:36:43 +02:00
parent 8b8cd26a59
commit c88d32150f
1 changed files with 2 additions and 1 deletions

View File

@ -67,7 +67,8 @@ public class BlendedTermQueryTest extends ElasticsearchLuceneTestCase {
for (int j = 0; j < iters; j++) {
Document d = new Document();
d.add(new TextField("id", Integer.toString(firstNames.length + j), Field.Store.YES));
d.add(new TextField("firstname", rarely() ? "some_other_name" : "simon", Field.Store.NO));
d.add(new TextField("firstname", rarely() ? "some_other_name" :
"simon the sorcerer", Field.Store.NO)); // make sure length-norm is the tie-breaker
d.add(new TextField("surname", "bogus", Field.Store.NO));
w.addDocument(d);
}