[ 
https://issues.apache.org/jira/browse/LUCENE-1312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12607828#action_12607828
 ] 

Jason Rutherglen commented on LUCENE-1312:
------------------------------------------

I have an exception but it's different and not sure what it's related to.  I 
need more debug code to see the details, if I can reproduce it.  I am assuming 
it is related to InstantiatedIndexReader, given it would be difficult to make 
happen with the regular IndexReader code.  Fails on the last line of the code 
given.  Probably something to do with InstantiatedIndexReader and deleted docs 
differing somehow with other data SegmentMerger is obtaining.

Exception:

org.apache.lucene.index.CorruptIndexException: doc counts differ for segment 
_0: fieldsReader shows 5 but segmentInfo shows 20
        at 
org.apache.lucene.index.SegmentReader.initialize(SegmentReader.java:322)
        at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:267)
        at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:235)
        at 
org.apache.lucene.index.DirectoryIndexReader$1.doBody(DirectoryIndexReader.java:90)
        at 
org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:649)
        at 
org.apache.lucene.index.DirectoryIndexReader.open(DirectoryIndexReader.java:97)
        at org.apache.lucene.index.IndexReader.open(IndexReader.java:213)
        at org.apache.lucene.index.IndexReader.open(IndexReader.java:209)

Code:
{code}
RAMDirectory ramDirectory = new RAMDirectory();
IndexWriter indexWriter = new IndexWriter(ramDirectory, false, 
system.getDefaultAnalyzer(), true);
indexWriter.setMergeScheduler(new SerialMergeScheduler());
indexWriter.setUseCompoundFile(true);
indexWriter.addIndexes(indexReaders);
indexWriter.close();
Directory.copy(ramDirectory, directory, true);
initialIndexReader = IndexReader.open(directory, indexDeletionPolicy);
{code}

                

> InstantiatedIndexReader does not implement getFieldNames properly
> -----------------------------------------------------------------
>
>                 Key: LUCENE-1312
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1312
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: contrib/*
>            Reporter: Jason Rutherglen
>            Assignee: Karl Wettin
>         Attachments: lucene-1312.patch, lucene-1312.patch, lucene-1312.patch, 
> lucene-1312.patch, lucene-1312.patch
>
>
> Causes error in org.apache.lucene.index.SegmentMerger.mergeFields

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to