>
> There really is no need to close an IndexSearcher until you need to
> instantiate another one, and even then you can let the old instance
> go without closing and all will still be well. If you construct
> IndexSearcher with a String directory name, there is no need to close
> anything other
On Oct 5, 2005, at 9:32 PM, Cyril Barlow wrote:
Creating an IndexSearcher for every request goes against how to use
Lucene best. A _single_ IndexSearcher for all searches is optimum.
You really ought to look into using a single instance.
Erik
---
- Original Message -
From: "Erik Hatcher" <[EMAIL PROTECTED]>
To:
Sent: Thursday, October 06, 2005 2:10 AM
Subject: Re: IndexSearcher in servlet containers
>
> On Oct 5, 2005, at 9:03 PM, Cyril Barlow wrote:
>
> >
> >
> >>> I'm get
On Oct 5, 2005, at 9:03 PM, Cyril Barlow wrote:
I'm getting :
java.io.IOException: The handle is invalid at
java.io.RandomAccessFile.seek(Native Method) at
Did you perhaps close the IndexSearcher somewhere along the way?
Erik
No, but I'm now creating new IndexSearchers every s
> > I'm getting :
> >
> > java.io.IOException: The handle is invalid at
> > java.io.RandomAccessFile.seek(Native Method) at
>
> Did you perhaps close the IndexSearcher somewhere along the way?
>
> Erik
No, but I'm now creating new IndexSearchers every servlet doPost method and
not closing
On Oct 5, 2005, at 8:15 PM, Cyril Barlow wrote:
Using one IndexSearcher across the whole application doesn't seem
to work.
It works for lucenebook.com :)
I'm getting :
java.io.IOException: The handle is invalid at
java.io.RandomAccessFile.seek(Native Method) at
Did you perhaps close the
- Original Message -
From: "Erik Hatcher" <[EMAIL PROTECTED]>
To:
Sent: Wednesday, October 05, 2005 8:20 PM
Subject: Re: IndexSearcher in servlet containers
>
> On Oct 5, 2005, at 2:09 PM, Cyril Barlow wrote:
> >> I'm really confused on the dile
On Oct 5, 2005, at 2:09 PM, Cyril Barlow wrote:
I'm really confused on the dilemma here.
You can create a startup hook using one of the Servlet specification
listeners, create an IndexSearcher there, stuff it into application
scope (context.setAttribute()).
There is no digging into Jetty's gut
- Original Message -
From: "Erik Hatcher" <[EMAIL PROTECTED]>
To:
Sent: Wednesday, October 05, 2005 6:34 PM
Subject: Re: IndexSearcher in servlet containers
>
> On Oct 5, 2005, at 9:54 AM, Cyril Barlow wrote:
> > Thanks all for your feedback. I
On Oct 5, 2005, at 9:54 AM, Cyril Barlow wrote:
Thanks all for your feedback. I'm going to look at building a
dedicated
server that keeps one IndexSearcher open and each servlet would use
that.
Either that or look deeper into the Jetty framework to see if I can
simply
invoke a global IndexS
Thanks all for your feedback. I'm going to look at building a dedicated
server that keeps one IndexSearcher open and each servlet would use that.
Either that or look deeper into the Jetty framework to see if I can simply
invoke a global IndexSearcher when the server starts and use that. Not quite
s
Take a look at the DelayCloseIndexSearcher I contributed yesterday.
http://issues.apache.org/jira/browse/LUCENE-445
You should set up a SearcherFactory in an object that implements
ServletContextListener that receives webapp startup/shutdown events and
your servlets should get an IndexSearcher fr
Cache IndexSearcher and only use *one* instance for all requests.
Application scope works well for this in a servlet environment.
Erik
On Oct 5, 2005, at 9:15 AM, Cyril Barlow wrote:
Has anyone got experience of using the IndexSearcher in a servlet?
I'm having caching problems when the
There where no problems for me.
Do you use the same IndexReader for all your searchers ?
Aviran
http://www.aviransplace.com
-Original Message-
From: Cyril Barlow [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 05, 2005 9:15 AM
To: java-user@lucene.apache.org
Subject: IndexSearcher in
14 matches
Mail list logo