lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morus Walter <morus.wal...@tanto-xipolis.de>
Subject Re: query matching all documents
Date Thu, 22 May 2003 06:31:31 GMT
Guilherme Barile writes:
> If you're trying to get all documents, why not
> 
> IndexReader reader = IndexReader.open(this.indexDir);
> Document doc;
> 	
> for (int i = 0; i < reader.maxDoc(); i++) {
> 	try {
> 		doc = reader.document(i);
> 		System.out.println(i + " " + doc.get("source"));
> 	}
> 	catch (Exception e) {
> 		System.out.println("Error getting doc " + i);
> 	}
> }
> 
I guess there should be some extra check to take care of deleted
documents, that aren't removed from the index yet.

greetings
	Morus

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message