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.mit...@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-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org
Send instant messages to your online friends http://in.messenger.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org