You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by DM...@lbl.gov on 2004/05/27 22:51:11 UTC
Hits object
At one point I thought I'd read that a Hits object
doesn't actually contain Documents, but rather
references to them. However, in that case I
wouldn't expect I could save a Hits object past the
closing of it's orginiating Searcher (in this case a
MultiSearcher: Hits hits =
myMultiSearcher.search(....)). yet later when I
access the same Hits object (having reinstantiated a
new MultiSearcher, myMultiSearcher2, but *not*
performing a new search) I can retrieve documents
from the Hits object without complaint. Is this
just my good fortune that things haven't been
garbage-collected yet? Or does the Hits object
contain the full document set?
--David
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org
Re: Hits object
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Hits caches up to 200 HitDocs, which may contain the underlying
Document. I suspect you accessed a Document that had already been
accessed and thus found something in the cache, and it did not have to
get back to the underlying searcher.
Erik
On May 27, 2004, at 4:51 PM, DMGoodstein@lbl.gov wrote:
> At one point I thought I'd read that a Hits object
> doesn't actually contain Documents, but rather
> references to them. However, in that case I
> wouldn't expect I could save a Hits object past the
> closing of it's orginiating Searcher (in this case a
> MultiSearcher: Hits hits =
> myMultiSearcher.search(....)). yet later when I
> access the same Hits object (having reinstantiated a
> new MultiSearcher, myMultiSearcher2, but *not*
> performing a new search) I can retrieve documents
> from the Hits object without complaint. Is this
> just my good fortune that things haven't been
> garbage-collected yet? Or does the Hits object
> contain the full document set?
>
> --David
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org