[TEST] use length-norm as the tie-breaker in BlendedTermQueryTest
This commit is contained in:
parent
8b8cd26a59
commit
c88d32150f
|
@ -67,7 +67,8 @@ public class BlendedTermQueryTest extends ElasticsearchLuceneTestCase {
|
||||||
for (int j = 0; j < iters; j++) {
|
for (int j = 0; j < iters; j++) {
|
||||||
Document d = new Document();
|
Document d = new Document();
|
||||||
d.add(new TextField("id", Integer.toString(firstNames.length + j), Field.Store.YES));
|
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));
|
d.add(new TextField("surname", "bogus", Field.Store.NO));
|
||||||
w.addDocument(d);
|
w.addDocument(d);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue