Issue Details (XML | Word | Printable)

Key: LUCENE-1228
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Doron Cohen
Reporter: Doron Cohen
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Lucene - Java

IndexWriter.commit() does not update the index version

Created: 13/Mar/08 07:19 PM   Updated: 14/Mar/08 11:49 PM
Return to search
Component/s: Index
Affects Version/s: 2.4
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works lucene-1228-commit-reopen.patch 2008-03-13 07:24 PM Doron Cohen 5 kB
Issue Links:
Reference
 

Lucene Fields: Patch Available
Resolution Date: 14/Mar/08 10:35 AM


 Description  « Hide
IndexWriter.commit() can update the index version and generation but the update of version is lost.
As result added documents are not seen by IndexReader.reopen().
(There might be other side effects that I am not aware of).
The fix is 1 line - update also the version in SegmentsInfo.updateGeneration().
(Finding this line involved more lines though... )

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #637041 Fri Mar 14 10:35:18 UTC 2008 doronc LUCENE-1228: IndexWriter.commit() was not updating the index version.
Files Changed
MODIFY /lucene/java/trunk/src/java/org/apache/lucene/index/SegmentInfos.java
MODIFY /lucene/java/trunk/CHANGES.txt
MODIFY /lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexReaderReopen.java