ScoredDocIdCollector sdic = ScoredDocIdCollector.create(docs.length, false);
assertTrue(
"when scoring disabled, out-of-order collection should be supported",
sdic.acceptsDocsOutOfOrder());
for (int i = 0; i < docs.length; i++) {
sdic.collect(docs[i]);
}
assertEquals("expected 3 documents but got " + sdic.getScoredDocIDs().size(), 3, sdic.getScoredDocIDs().size());
ScoredDocIDsIterator iter = sdic.getScoredDocIDs().iterator();
Arrays.sort(docs);