LUCENE-7383: fix test, only use BoostQuery once

This commit is contained in:
Martijn van Groningen 2016-07-15 16:32:04 +02:00 committed by Martijn van Groningen
parent f9c9470641
commit 2e0b2f5e37
1 changed files with 1 additions and 2 deletions

View File

@ -959,10 +959,9 @@ public class FieldQueryTest extends AbstractTestCase {
initBoost();
Query childQuery = tq(boost, "a");
Query query = new ToParentBlockJoinQuery(childQuery, new QueryBitSetProducer(new MatchAllDocsQuery()), ScoreMode.None);
query = new BoostQuery(query, boost );
FieldQuery fq = new FieldQuery(query, true, true );
Set<Query> flatQueries = new HashSet<>();
fq.flatten(query, reader, flatQueries, 1f );
fq.flatten(query, reader, flatQueries, 1f);
assertCollectionQueries(flatQueries, tq(boost, "a"));
}