On Oct 6, 2005, at 11:28 AM, Cyril Barlow wrote:
How long does the Hits object stay in memory for?

As long as you keep it around. Lucene isn't responsible for keeping a reference to it, your application is.

Until the IndexSearcher closes? And if you just use 1 IndexSearcher would there be a big collection
of Hits in memory?

See above. You're entirely in charge of the Hits object being kept around, or not.

Since you're obviously in a servlet environment, you probably will want to implement some sort of paging through Hits. One option is to simply throw Hits away after every request and re-search for every page. That works well enough in every case I've encountered that I haven't used the alternative of keeping Hits around across requests.

    Erik




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to