I am a bit confused about what you are asking. Why do you need the Searcher to time out? That code should release your searchers at the appropriate times...when the index has been modified. The way that I use it is to make a synchronized map that keeps around an index accessor for each index that I open...from there the code should do the rest...when a writer or a writing reader is released the code waits for all searchers to be released and then clears the cache of searchers and new searchers are created when requested until another writer or writing reader is released...

Mohammad Norouzi wrote:
Thank you Mark for your useful help. the code you introduce was very helpful
for me

but my only question is that I need to place an idle time for each open
searcher, so if it exceed the specific time then release that searcher and
get ready for another thread.

how can I put such this feature, I was thinking of a timeout listener, but
dont know where tu put it. I have a SingleSearcher that wraps lucene's
Searcher and it returns an ResultSet in which I put a Hits object. do I have
to put the time in my ResultSet or my SingleSeacher?

still I dont know ehrthrt the reader is important for Hits or Searcher?
consider I passed a hits to my ResultSet, now, if I close searcher, will the
Reader get closed?  or another vague thing is can a Reader work thread
safely for every Searcher with differenet queries?

Thank you very much again.

On 2/22/07, Mark Miller <[EMAIL PROTECTED]> wrote:

I would not do this from scratch...if you are interested in Solr go that
route else I would build off
http://issues.apache.org/jira/browse/LUCENE-390

- Mark

Mohammad Norouzi wrote:
> Hi all,
> I am going to build a Searcher pooling. if any one has experience on
> this, I
> would be glad to hear his/her recommendation and suggestion. I want to
> know
> what issues I should be apply. considering I am going to use this on a
> web
> application with many user sessions.
>
> thank you very much in advance.

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





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

Reply via email to