You could create your own SimpleFSLockFactory, specifying a different
lock dir, and pass that to FSDirectory.getDirectory.
This way you can control where the lock file is created and hopefully
put it in a dir that you're able to delete from.
Or, update to a newer version of Lucene, which stores the lock file
in the index directory by default.
Mike
anjana m wrote:
hey i am running my indexer on application server/ production server..
i cant delete the files..
please give me a good solution..
changing true and false is not working..if have add new docs..
can nay one help me..please...
regards
anjana
On Jan 31, 2008 3:02 PM, Michael McCandless
<[EMAIL PROTECTED]>
wrote:
Physically delete the file, or, use IndexReader.unlock static method.
Mike
On Jan 31, 2008, at 4:26 AM, anjana m wrote:
How do i remove the locks..?
On Jan 31, 2008 2:49 PM, Michael McCandless
<[EMAIL PROTECTED]>
wrote:
It looks like you are passing "true" to FSDirectory.getDirectory,
which you shouldn't do. Always pass "false" to that. (Newer
versions of Lucene have deprecated the create flag to FSDirectory,
leaving it entirely to IndexWriter).
On the lock obtain timed out, probably that's a left over lock
file,
so you should just remove it if you're sure it is.
Mike
anjana m wrote:
with true:
i finding a serious problem when i need new index please help..
but how can ikeep chnaging the true flase option..
:(
please help me...:(
Exception in thread "main" java.io.IOException: Cannot delete
_17.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)
False
Exception in thread "main" java.io.IOException: Lock obtain timed
out:
[EMAIL PROTECTED]:\DOCUME~1\ANJANA\LOCALS~1\Temp\lucene-
3ca21f86af4e6d9f86b82f8f13be98e4-write.lock
at org.apache.lucene.store.Lock.obtain(Lock.java:58)
at org.apache.lucene.index.IndexWriter.<init>
(IndexWriter.java:223)
at org.apache.lucene.index.IndexWriter.<init>
(IndexWriter.java:193)
at com.cecilia.wim.process.Indexer.index(Indexer.java:25)
at com.cecilia.wim.process.Indexer.main(Indexer.java:60)
On Jan 28, 2008 3:22 AM, Erick Erickson <[EMAIL PROTECTED]>
wrote:
Set the parameter to false as per the documentation....
Erick
On Jan 27, 2008 5:11 AM, anjana m <[EMAIL PROTECTED]>
wrote:
yes i dont want the old index to be deletd since its running on
my app
server..
any suggestion..?
On Jan 27, 2008 3:07 PM, Daniel Naber
<[EMAIL PROTECTED]>
wrote:
On Sonntag, 27. Januar 2008, anjana m wrote:
IndexWriter writer = new IndexWriter(indexDir, new
StandardAnalyzer(), true);
The true parameter means that the old index will be deleted, is
that
your
problem?
Regards
Daniel
--
http://www.danielnaber.de
---------------------------------------------------------------
--
--
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: java-user-
[EMAIL PROTECTED]
-------------------------------------------------------------------
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]