J.J. Larrea wrote:
At 6:39 PM +0200 10/4/05, Olivier Jaquemet wrote:
In every case I think I will use this to prevent any problem but why nobody
uses finalize methods? is it somehow bad to try to close things correctly that
way?
Because they are not run under "brutal termination" co
m: Olivier Jaquemet [mailto:[EMAIL PROTECTED]
Sent: dinsdag 4 oktober 2005 18:39
To: java-user@lucene.apache.org
Subject: Re: Renewing IndexSearcher on index change.
Volodymyr Bychkoviak wrote:
> I'm using following code during program startup
[...]
> but this method should be used if you
Oops! Yes that's correct. Thanks for catching it... - J.J.
At 10:33 AM -0700 10/4/05, Chris Hostetter wrote:
>: // feebly try to prevent concurrent reentry problems
>: IndexWriter w = writer;
>: w = null;
>: try {
>: w.c
: // feebly try to prevent concurrent reentry problems
: IndexWriter w = writer;
: w = null;
: try {
: w.close();
Just to clarify for the folks at home, I'm pretty sure you ment...
IndexWriter w = write
At 6:39 PM +0200 10/4/05, Olivier Jaquemet wrote:
>In every case I think I will use this to prevent any problem but why nobody
>uses finalize methods? is it somehow bad to try to close things correctly that
>way?
Because they are not run under "brutal termination" conditions. For that you
need
Volodymyr Bychkoviak wrote:
I'm using following code during program startup
[...]
but this method should be used if you are running only one instance of
such program (because one program can unlock index locked by another
program for indexing for example)
Okay this perfect for our applica
Olivier Jaquemet wrote:
Thank you very much Volodymyr!
Exactly the perfect answer I needed.
One last question: how do you manage brutal interruption of you
program? Cause as far as I am concerned, if I don't use a finalize
method in which I close opened searchers, if for some reason the jvm
Thank you very much Volodymyr!
Exactly the perfect answer I needed.
One last question: how do you manage brutal interruption of you program?
Cause as far as I am concerned, if I don't use a finalize method in
which I close opened searchers, if for some reason the jvm terminates,
on next run of
Hi Olivier!
In my code i'm using following IndexSearcher extention:
public class IndexSearcherWrapper extends IndexSearcher {
private int referenceCount;
private final IndexReader indexReader;
public IndexSearcherWrapper(IndexReader indexReader) {
super(indexReader);
this.indexReader
any thoughts on this subjects ?
Olivier Jaquemet wrote:
Hi all,
As I read it on LIA, and as it has already been said on the mailing
list multiple times, you only need one IndexSearcher for all your
thread, and when your index change, you just need to create a new one
to reflect changes.
O
Hi all,
As I read it on LIA, and as it has already been said on the mailing list
multiple times, you only need one IndexSearcher for all your thread, and
when your index change, you just need to create a new one to reflect
changes.
Otis said in this post you could replaced old searcher and l
11 matches
Mail list logo