You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by su...@zapak.co.in on 2010/03/23 11:21:02 UTC

using lucene from apache threads

Hi,

I am using Apache threads to invoke a cgi , which is opening and closing
the index searcher for every thread.
for all threads , m making searches. Does that mean , for every thread
the indexes would be loaded on to memory for searching.
coz, then its very inefficient.

Is there any method by which we can conserve the instance between the
Apache threads.

Thanks and regards,
Suman



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: using lucene from apache threads

Posted by Ian Lea <ia...@gmail.com>.
Indexes aren't exactly loaded into memory when opened, but your
approach certainly is inefficient.  A common alternative is to have
apache talking to e.g. tomcat and tomcat will keep an index open.  Or
send queries to solr or a daemon or whatever.  Your cgi scripts could
run a program which talks to solr which would keep the index open.
Lots of options but running a program which opens a searcher for every
invocation is probably the most inefficient of all!


--
Ian.



On Tue, Mar 23, 2010 at 10:21 AM,  <su...@zapak.co.in> wrote:
>
> Hi,
>
> I am using Apache threads to invoke a cgi , which is opening and closing
> the index searcher for every thread.
> for all threads , m making searches. Does that mean , for every thread
> the indexes would be loaded on to memory for searching.
> coz, then its very inefficient.
>
> Is there any method by which we can conserve the instance between the
> Apache threads.
>
> Thanks and regards,
> Suman
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org