adeppathondur / luke

Automatically exported from code.google.com/p/luke
0 stars 0 forks source link

Cannot open in read-only mode if write.lock is present #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open an existing index for write (creating a write.lock)
2. Open lukeall-1.0.1 and try to open index in read-only mode
3. Error message says must open as read/write and force unlock

What is the expected output? What do you see instead?
I should be able to open the index in read only mode without having to open
read/write and force unlock

What version of the product are you using? On what operating system?
lukeall-1.0.1.jar on linux (Centos 5)

Please provide any additional information below.
This would be a nice enhancement which is supported by Lucene 3.0

Original issue reported on code.google.com by dcli...@gmail.com on 7 Apr 2010 at 12:13

GoogleCodeExporter commented 9 years ago
I have the same problem.

Original comment by bill.ms....@gmail.com on 26 May 2010 at 8:25

GoogleCodeExporter commented 9 years ago
I had the same problem. After the index creation I had many different files in 
my index folder (*.fdt, *.fdx, *.tvf, *.tvx, etc.). Whet I tried to open the 
index, there always came an error.
Then I created the index once more AND did "myIndexWriter.close()" at the end 
of the indexing process. After that I had ony 3 files in the index folder 
(_0.cfs, semgents.gen, segments_2) and I could open the index with Luke without 
any errors.
Hope that helps you (or others with this issue?).

Original comment by karolina...@googlemail.com on 18 Jan 2011 at 1:20

GoogleCodeExporter commented 9 years ago
This behavior of Lucene and Luke is as designed. It's there to prevent 
accidental index corruption if there is another process that is still writing 
to the index. Therefore it makes sense that it should require a write access 
and it should be a conscious decision that you really want to modify an 
existing index (unlocking is a modification).

Original comment by sig...@gmail.com on 27 Apr 2011 at 10:19

GoogleCodeExporter commented 9 years ago
Huh? Why does it make sense that it should require write access? I came across 
this when trying to read an index that was currently being written by another 
process.  I know you shouldn't have more than one concurrent writer, which is 
why I selected "Open in Read-Only mode".  Seems like Luke should allow 
read-only access to a locked index, since that's what Lucene is designed to 
support.

Original comment by martin.m...@gmail.com on 6 Sep 2011 at 4:07