lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guilherme Barile <...@prosoma.com.br>
Subject Re: query matching all documents
Date Thu, 22 May 2003 13:11:17 GMT
As I said, I'm still getting started (didn't implement deleting
documents yet). Any tips on checking this ?

On Thu, 2003-05-22 at 03:31, Morus Walter wrote:
> 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
> 


---------------------------------------------------------------------
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