lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Bräuer <newslet...@matrix-web.de>
Subject Re: "Best-practice" in a web application AND live update of index used by Tomcat
Date Wed, 21 Sep 2005 18:53:45 GMT
Hello,

>Are you sure that both processes use the same directory to store the Lock files?
>  
>
Well, the variable FSDirectory.LOCK_DIR shows for both applications the 
same value (the temp directory in my home directory C:\Documents and 
Settings\Matthew\...). 

>If both processes are on the same machine, they will both default to the same local directory
and you won't see the problem.
>  
>
But I do:

Caused by: java.io.IOException: Cannot delete _28.cfs
    at org.apache.lucene.store.FSDirectory.create(FSDirectory.java:144)
    at org.apache.lucene.store.FSDirectory.<init>(FSDirectory.java:128)
    at 
org.apache.lucene.store.FSDirectory.getDirectory(FSDirectory.java:102)
    at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:193)

This happens, as explained, both when I try to reindex while the index 
is open in Luke and also when a Searcher of my web application is not 
closed yet.

>It's probably because the Writer isn't aware that a Reader is using the files that it
tries to delete the obsolete ones immediately.  On Windows machines, the list of files that
cannot be deleted immediately is stored in the file "deletable".
>  
>
There is no such file in my index directory. This might be the reason 
but how do I convince Lucene to create such a file?

Kind regards,
Matthias



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


Mime
View raw message