lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: Getting all the matching documents for a search
Date Thu, 01 Jun 2006 08:11:08 GMT

On Jun 1, 2006, at 3:49 AM, Chun Wei Ho wrote:
> I use Hits to search for and get documents matching a particular  
> query, e.g.:
> Hits hits = TermQuery(new Term 
> ("startswith","A")));
> but it is not returning all the matching documents in the index. From
> experimentation it appears to return about less than half the matching
> documents unless the number of matching documents is less than 100. Is
> there an option that I can specify so that it returns the whole list
> of matching documents?

What do you mean it is not returning all of the documents?  If you  
iterate through the documents provided by Hits it will return _all_  
documents that match that Query.  I recommend you have a look at your  
index with Luke and ensure things are indexed as you expect.  There  
are other methods you can use that use  
HitCollector or return TopDocs instead of Hits - you could use those  
but the issue is likely nothing those methods would fix.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message