lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "m.harig" <>
Subject Re: Read large size index
Date Mon, 29 Jun 2009 16:36:10 GMT

Thanks Simon , 

Hey there, that makes things easier. :)

ok here are some questions:

>>>Do you iterate over all docs calling hits.doc(i) ?If so do you have to
load all fields to render your results, if not you should not retrieve
all of them?

Yes, am iterating over all docs by calling hits.doc(i) , 

You use IndexSearchersearch(Query q,...) which returns a Hits object
have you tried to use the new search methods returning TopDocs?

Sorry, i didn't , could you please send me a piece of code.

when you search for pdf and get 30k results you load all the "stored"
field content into memory once you call IndexSearcher.doc(i) as it
internally calls IndexReader.document(i, null). This is equivalent to
a "Load All fields" FieldSelector.
You can have a closer look at FieldSelector and the new search methods
which accept them. This is a way to make you retrieval faster and load
only the fields you really need.

View this message in context:
Sent from the Lucene - Java Users mailing list archive at

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

View raw message