Luc,

I tried adding your DelayCloseIndexSearcher to my project (a Tomcat app
where the index is repeatedly searched and frequently updated) and as
soon as an index modify occurs (by a separate thread) and I call
closeWhenDone() in the main thread I get
IllegalStateException("closeWhenDone() already called").  The Exception
is thrown for every subsequent search attempt.

Any ideas?

Thanks,

Nick.

Vanlerberghe, Luc wrote:
> Yep,
>
> I created DelayCloseIndexSearcher just for this scenario and it's
> running in production for about half a year now...
>
> There's an usage example in the javadoc, but it can be optimised even
> more (without touching the code that does the searches, handles the
> hits, etc...).
>
> In my production environment, isCurrent() is called in a separate
> thread.  If it returns false, a new DelayCloseIndexSearcher instance is
> created, some warming up is done and only then the existing one is
> replaced and closeWhenDone is called on it.
>
> Luc
>
> -----Original Message-----
> From: Koji Sekiguchi [mailto:[EMAIL PROTECTED] 
> Sent: dinsdag 21 maart 2006 9:24
> To: java-user@lucene.apache.org
> Subject: RE: Re-creating IndexSearcher after update
>
> Hi Steve,
>
> DelayCloseIndexSearcher may suit your requirement?
>
> Please check:
> http://issues.apache.org/jira/browse/LUCENE-445
>
> Hope this helps.
>
> Koji
>
>
>
>
> ---------------------------------------------------------------------
> 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]
>
>   

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

Reply via email to