You have to re-init the searcher / reader object. You can re-init the
reader object that the searcher uses, without re-initing the searcher
object itself, as stated earlier here
On Wed, 28 Jun 2006 14:23:21 +0200, heritrix.lucene
<[EMAIL PROTECTED]> wrote:
o o no
I mean the searching wou
o o no
I mean the searching would be fast or not... But now i have tested. The
result that i found reveals that there would be no difference in terms of
searching speed.
But there is another thing that i want to ask. What if the index is changed
in between.
Will the indexReader give the results w
On Jun 28, 2006, at 6:53 AM, heritrix.lucene wrote:
Is there any difference in terms of speed between IndexReader and
IndexSearcher??
I'm assuming you mean is there any difference in speed in how you
construct an IndexSearcher no.
Erik
On 6/27/06, Erik Hatcher <[EMAIL PRO
As far as i know, an IndexSearcher use an IndexReader.. Hence you can do
searcher.getIndexReader().. even tho you instanciated the searcher with a
string path or a directory. So, i would guess that by creating a searcher
with an indexreader as parameter, the constructor will be faster.
But,
Is there any difference in terms of speed between IndexReader and
IndexSearcher??
On 6/27/06, Erik Hatcher <[EMAIL PROTECTED]> wrote:
On Jun 27, 2006, at 10:32 AM, Fabrice Robini wrote:
> That's also my case...
> I create a new IndexSearcher at each query, but with a static and
> instanciate
ent.
--Renaud
- Original Message - From: "Erik Hatcher"
<[EMAIL PROTECTED]>
To:
Sent: Tuesday, June 27, 2006 3:49 AM
Subject: Re: IndexSearcher in Servlet
On Jun 27, 2006, at 5:47 AM, Fabrice Robini wrote:
What is your advice for webApplication ?
It all depends
uot;Erik Hatcher" <[EMAIL PROTECTED]>
To:
Sent: Tuesday, June 27, 2006 3:49 AM
Subject: Re: IndexSearcher in Servlet
On Jun 27, 2006, at 5:47 AM, Fabrice Robini wrote:
What is your advice for webApplication ?
It all depends :)
- IndexSearcher pool ?
No point in that. A single Index
On Jun 27, 2006, at 10:32 AM, Fabrice Robini wrote:
That's also my case...
I create a new IndexSearcher at each query, but with a static and
instanciated Directory.
New IndexSearcher(myDirectory)
It seems to be OK... am I wrong ?
You may be "ok" given your query patterns, but you won't benef
static searcher. Of
course you
still have to manage the static reader. Am I wrong in my thinking
here?
Thanks,
Michael Crump
-Original Message-
From: Erik Hatcher [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 27, 2006 6:49 AM
To: java-user@lucene.apache.org
Subject: Re: IndexSear
java-user@lucene.apache.org
Subject: RE: IndexSearcher in Servlet
Hello,
I have another question along this line. One of the points made in this
thread was to never create a new IndexSearcher for each query. Is this
true even in the case that an IndexSearcher is being created with a
static or c
Singleton pattern is better. Than you can extend it to proxy pattern.
existing IndexReader really isn't that expensive and does get around
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
e the static reader. Am I wrong in my thinking here?
Thanks,
Michael Crump
-Original Message-
From: Erik Hatcher [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 27, 2006 6:49 AM
To: java-user@lucene.apache.org
Subject: Re: IndexSearcher in Servlet
On Jun 27, 2006, at 5:47 AM, Fabrice Robini
Tuesday, June 27, 2006 8:01 AM
> To: java-user@lucene.apache.org
> Subject: RE: IndexSearcher in Servlet
>
>
> Erik,
>
> Thank you for your reply.
> I'm goingto use the static IndexSearcher in my Servlet (my
> index is static).
>
> Thanks :-)
>
&g
Erik,
Thank you for your reply.
I'm goingto use the static IndexSearcher in my Servlet (my index is static).
Thanks :-)
-Original Message-
From: Erik Hatcher [mailto:[EMAIL PROTECTED]
Sent: mardi 27 juin 2006 12:49
To: java-user@lucene.apache.org
Subject: Re: IndexSearcher in Se
[EMAIL PROTECTED]
Sent: mardi 27 juin 2006 11:41
To: java-user@lucene.apache.org
Subject: Re: IndexSearcher in Servlet
On Jun 27, 2006, at 5:11 AM, heritrix.lucene wrote:
> Hi,
> I also had the same confusion. But today when i did the testing i
> found that
> it will merge your results. T
makes sense in my current project.
Erik
Thanks a lot,
Fab
-Original Message-
From: Erik Hatcher [mailto:[EMAIL PROTECTED]
Sent: mardi 27 juin 2006 11:41
To: java-user@lucene.apache.org
Subject: Re: IndexSearcher in Servlet
On Jun 27, 2006, at 5:11 AM, heritrix.lucene wrote:
: Re: IndexSearcher in Servlet
On Jun 27, 2006, at 5:11 AM, heritrix.lucene wrote:
> Hi,
> I also had the same confusion. But today when i did the testing i
> found that
> it will merge your results. Therefore i believe that indexSearcher
> is not
> thread safe. I tried this
ead safe.
Jelda
> -Original Message-
> From: heritrix.lucene [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 27, 2006 10:58 AM
> To: java-user@lucene.apache.org
> Subject: Re: IndexSearcher in Servlet
>
> Hi,
> The same question i asked yesterday. :-) And now i know the
.org
> Subject: Re: IndexSearcher in Servlet
>
> Hi,
> The same question i asked yesterday. :-) And now i know the answer :0
>
> Creating a new searcher for each query will make your
> application very very slow... (leave this idea) U can not
> have a static indexsearcher object
e.apache.org
> Subject: Re: IndexSearcher in Servlet
>
> Hi,
> The same question i asked yesterday. :-) And now i know the answer :0
>
> Creating a new searcher for each query will make your
> application very very slow... (leave this idea) U can not
> have a static ind
ROTECTED]
Sent: mardi 27 juin 2006 10:58
To: java-user@lucene.apache.org
Subject: Re: IndexSearcher in Servlet
Hi,
The same question i asked yesterday. :-)
And now i know the answer :0
Creating a new searcher for each query will make your application very very
slow... (leave this idea)
U can no
Hi,
The same question i asked yesterday. :-)
And now i know the answer :0
Creating a new searcher for each query will make your application very very
slow... (leave this idea)
U can not have a static indexsearcher object. It will merge all results and
the user will get the result of their que
>
> 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
36 matches
Mail list logo