On Tue, Aug 11, 2009 at 2:10 PM, Paul Tomblin<[email protected]> wrote:
> I want to iterate through all the documents that are in the crawl,
> programattically. The only code I can find does searches. I don't
> want to search for a term, I want everything. Is there a way to do
> this?
To answer my own question, what I ended up doing was
IndexReader reader = IndexReader.open(indexDir.getAbsolutePath());
for (int i = 0; i < reader.numDocs(); i++)
{
Document doc = reader.document(i);
}
Now that I have the Document, I have to figure out how to process it
further to get the actual contents, but I assume that I need to go
back to the segment for that.
--
http://www.linkedin.com/in/paultomblin