On Friday 09 April 2004 23:59, Ype Kingma wrote:When you need 3000 hits and their stored fields, you might consider using the lower level search API with your own HitCollector.
I apologize for the stupid question but ... where's the actualy result in
HitCollector? :-)
collect(int doc, float score)
Where doc is the index and score is its score - and where's the Document?
Thats the beauty.... it is up to you to load the doc iff you want it. In many situations, loading the doc would slow things down dramatically. For example, QueryFilter uses a HitCollector internally, but could care less about the actual document object, just its id (which you get from the int doc). To get the doc:
Document document = searcher.doc(doc);
(I'd use 'id' for the int, personally).
Erik
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
