Midhat
Midhat

Reputation: 17810

Lucene index deleted when opening with Luke/Indexreader

I was creating a lucene index when my indexing program crashed. The indexer had processed about 3M documents before crashing, producing a 14GB file. When I opened the index in Luke (with force unlock), the whole index was gone!. poof.

The opened index had 0 documents and its size was reduced to 1kb. Did anyone experience this, or can offer an explanation

(Using Lucene.Net 2.9)

Upvotes: 0

Views: 374

Answers (1)

Martin Blech
Martin Blech

Reputation: 13543

Most probably, your indexing code never called commit() before crashing. If you don't want to lose all your changes, you should call commit() every X added documents.

Upvotes: 2

Related Questions