lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Burleson <pburle...@gmail.com>
Subject Re: lucene locks index, tomcat has to stop and restart
Date Tue, 07 Sep 2004 21:03:00 GMT
This isn't a Tomcat specific problem, but sounds like a problem with
how you the reader is being used.

Somewhere in the JSP a IndexReader variable was probably assigned to.
A line something like:

IndexReader ir = IndexReader.open("somepath");

To close the reader, and thus solve the problem, somewhere later, you need:

ir.close();

with the needed try/catch in place. 

Again, please refrain from cross-posting...just because it happened on
Tomcat doesn't make it a Tomcat problem. This is clearly a lucene
usage problem.

Patrick

On Tue, 7 Sep 2004 16:37:42 -0400, hui liu <ivy.liu@gmail.com> wrote:
> Hi,
> 
> I met with such a problem with lucene demo:
> 
> Each time when I create lucene index, I have to first stop tomcat, and
> restart tomcat after the index is created. The reason is: the index is
> locked when using IndexReader.open(index) method in the jsp file.
> 
> So, I tried to modify the jsp codes by adding close(), but it shows
> error which said "close() is not a static method". I checked the
> source codes of lucene IndexReader methods, and found that the close()
> method is final not static. I tried to change it to static, but
> resulted in many errors.
> 
> So, does anybody meet the similar problem as me? Do you have any solutions?
> 
> Thank you very very much.....!!
> 
> Ivy.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
>

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


Mime
View raw message