lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ganesh" <emailg...@yahoo.co.in>
Subject Re: How to extract Document object after the search?
Date Mon, 02 Feb 2009 12:37:33 GMT
Searcher.doc(int) or IndexReader.document(int) will give you the document 
object and to my knowledge this is the only way available, however it is not 
advisable to query all documents (MatchAllDocsQuery) and load all document 
objects. While using Searcher.doc(int) or IndexReader.document(int), load 
only the required fields to display the results Searcher.doc(int, 
FieldSelector).

Regards
Ganesh


----- Original Message ----- 
From: "mittals" <sourabh-931.mittal@morganstanley.com>
To: <java-user@lucene.apache.org>
Sent: Monday, February 02, 2009 5:24 PM
Subject: How to extract Document object after the search?


>
> As per Lucene documentation -
> "For good search performance, implementations of this method should not 
> call
> Searcher.doc(int) or IndexReader.document(int) on every document number
> encountered. Doing so can slow searches by an order of magnitude or more."
>
> My question is - what's the other way to get the Document object to avoid
> performance bottleneck?
>
> -- 
> View this message in context: 
> http://www.nabble.com/How-to-extract-Document-object-after-the-search--tp21788361p21788361.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 

Send instant messages to your online friends http://in.messenger.yahoo.com 

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


Mime
View raw message