dcsimg
Rebuilding index failure
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Dragos_Carciumaru
Posted On:   Thursday, January 22, 2004 05:24 AM

Hi everybody, i'm new in working with lucene indexing, and i hope that anybody could help me with the followiing problem: i cannot rebuild index after i have some searches done. The error that i get is: 2002-11-19 23:54:55,250 ERROR [STDERR] java.io.IOException: couldn't delete r.fdt 2002-11-19 23:54:55,250 ERROR [STDERR] at com.lucene.store.FSDirectory. (FSDirectory.java:55) 2002-11-19 23:54:55,250 ERROR [STDERR] at com.lucene.store.FSDirectory. (FSDirectory.java:40) 2002-11-19 23:54:55,250 ERROR [STDERR] at com.lucene.index.IndexWriter. (IndexWriter.java:63) ............ If i try to rebuild index at the first time   More>>

Hi everybody,
i'm new in working with lucene indexing, and i hope that anybody could help me with the followiing problem:
i cannot rebuild index after i have some searches done. The error that i get is:



2002-11-19 23:54:55,250 ERROR [STDERR] java.io.IOException: couldn't delete r.fdt

2002-11-19 23:54:55,250 ERROR [STDERR] at
com.lucene.store.FSDirectory. (FSDirectory.java:55)

2002-11-19 23:54:55,250 ERROR [STDERR] at
com.lucene.store.FSDirectory. (FSDirectory.java:40)

2002-11-19 23:54:55,250 ERROR [STDERR] at
com.lucene.index.IndexWriter. (IndexWriter.java:63)

............




If i try to rebuild index at the first time (before searching), is ok and i can rebuild.
But after i make a search, and then i try to rebuild index, the index files (located in my search folder) are somehow locked, and rebuilding index fails because these files cannot be deleted (i also tried to erase them manually, from windows, but it also failed, because they were used by something).


I did some debug, and after searching, when i call :
"writer = new IndexWriter(indexPath, analyzer, true)", writer is null! So i cannot create a new indexWriter.

I mention that updating index ("writer = new IndexWriter(indexPath, analyzer, false")) works ok.


Do you have any idea what is happening? or this behaviour is normal?


Thanx,
Dragos

   <<Less

Re: Rebuilding index failure

Posted By:   Otis_Gospodnetic  
Posted On:   Friday, January 23, 2004 03:21 AM

It looks like you are misusing Lucene a bit.
If you want to rebuild your index, close IndexSearcher first.
Close everything that accesses the index: IndexReader, IndexWriter, IndexSearcher.

Otis
About | Sitemap | Contact