LUCENE-5207: didnt mean to change unrelated test...

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene5207@1523395 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2013-09-15 03:43:17 +00:00
parent 6c6564f2be
commit 0ddbdc4cbc
1 changed files with 5 additions and 5 deletions

View File

@ -126,19 +126,19 @@ public class TestSearchAfter extends LuceneTestCase {
}
void assertQuery(Query query, Filter filter, Sort sort) throws Exception {
int size = _TestUtil.nextInt(random(), 1, searcher.getIndexReader().maxDoc());
int maxDoc = searcher.getIndexReader().maxDoc();
TopDocs all;
int pageSize = _TestUtil.nextInt(random(), 1, size*2);
int pageSize = _TestUtil.nextInt(random(), 1, maxDoc*2);
if (VERBOSE) {
System.out.println("\nassertQuery: query=" + query + " filter=" + filter + " sort=" + sort + " pageSize=" + pageSize);
}
final boolean doMaxScore = random().nextBoolean();
if (sort == null) {
all = searcher.search(query, filter, size);
all = searcher.search(query, filter, maxDoc);
} else if (sort == Sort.RELEVANCE) {
all = searcher.search(query, filter, size, sort, true, doMaxScore);
all = searcher.search(query, filter, maxDoc, sort, true, doMaxScore);
} else {
all = searcher.search(query, filter, size, sort);
all = searcher.search(query, filter, maxDoc, sort);
}
if (VERBOSE) {
System.out.println(" all.totalHits=" + all.totalHits);