@Test public void testTermDocIterable() throws IOException { for (int pass = 0; pass < 1; pass++) { for (int id = 0; id < BLOCKS; id++) { DocsEnum termDocs = reader.termDocsEnum(new Term("id", Integer.toString(id))); TermDocIterable iterable = new TermDocIterable(termDocs, reader); int count = 0; int i = 0; long s = System.nanoTime(); for (Document document : iterable) { count++; assertEquals(i, Integer.parseInt(document.get("field"))); i++; } long time = System.nanoTime() - s; System.out.println(time / 1000000.0 + " " + id + " " + pass); assertEquals(COUNT_PER_BLOCK, count); } } }
public TermDocIterable(DocsEnum docsEnum, AtomicReader reader) { this(docsEnum, reader, new ResetableDocumentStoredFieldVisitor()); }
TermDocIterable implements Iterable<Document> { public TermDocIterable(DocsEnum docsEnum, AtomicReader reader) { this(docsEnum, reader, new ResetableDocumentStoredFieldVisitor()); } }
TermDocIterable implements Iterable<Document> { public TermDocIterable(DocsEnum docsEnum, AtomicReader reader) { this(docsEnum, reader, new ResetableDocumentStoredFieldVisitor()); } TermDocIterable(DocsEnum docsEnum, AtomicReader reader);  TermDocIterable(DocsEnum docsEnum, AtomicReader reader, ResetableDocumentStoredFieldVisitor fieldSelector); }
TermDocIterable implements Iterable<Document> { public TermDocIterable(DocsEnum docsEnum, AtomicReader reader) { this(docsEnum, reader, new ResetableDocumentStoredFieldVisitor()); } TermDocIterable(DocsEnum docsEnum, AtomicReader reader);  TermDocIterable(DocsEnum docsEnum, AtomicReader reader, ResetableDocumentStoredFieldVisitor fieldSelector); @Override Iterator<Document> iterator(); }
TermDocIterable implements Iterable<Document> { public TermDocIterable(DocsEnum docsEnum, AtomicReader reader) { this(docsEnum, reader, new ResetableDocumentStoredFieldVisitor()); } TermDocIterable(DocsEnum docsEnum, AtomicReader reader);  TermDocIterable(DocsEnum docsEnum, AtomicReader reader, ResetableDocumentStoredFieldVisitor fieldSelector); @Override Iterator<Document> iterator();  }