lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Quail <m...@cenqua.com>
Subject Re: "docs out of order exception" in Lucene. Please help.
Date Thu, 24 Mar 2005 04:59:26 GMT
I have also just seen this exception in a production system (lucene  
1.4.3).

Any tips on what might be causing it? I'll be attempting to reproduce  
it later, but I'm quite confident that while I'm using that  
IndexWriter, no other readers are open, and no other Writers, either.

java.lang.IllegalStateException: docs out of order
	at  
org.apache.lucene.index.SegmentMerger.appendPostings(SegmentMerger.java: 
353)
	at  
org.apache.lucene.index.SegmentMerger.mergeTermInfo(SegmentMerger.java: 
316)
	at  
org.apache.lucene.index.SegmentMerger.mergeTermInfos(SegmentMerger.java: 
290)
	at  
org.apache.lucene.index.SegmentMerger.mergeTerms(SegmentMerger.java: 
254)
	at org.apache.lucene.index.SegmentMerger.merge(SegmentMerger.java:93)
	at  
org.apache.lucene.index.IndexWriter.mergeSegments(IndexWriter.java:487)
	at  
org.apache.lucene.index.IndexWriter.maybeMergeSegments(IndexWriter.java: 
458)
	at  
org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:310)
	at  
org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:294)

=Matt

On 24/03/2005, at 9:21 AM, Alexis Rodriguez wrote:

> Hello, we have an issue with Lucene and haven't found a solution so  
> far.
> So, I'm asking for your help if that's possible.
>
> The scenario is as follows:
> We are using 2 lucene FS directories, a main one and a small temporary  
> one
> where all our documents are added. After adding 100 documents, that  
> small
> directory is merged into the main one and then a new index is created
> into the same temporary directory (using IndexWriter constructor with  
> create = true).
> We also have a MultiReader on both directories (wraps 2 indexReaders)  
> for
> doing search and removal of documents.
> This MultiReader is never closed explicitally. Instead the IndexReader  
> on the main directory
> is closed only when doing a merge, and the indexReader on the temp  
> directory is
> closed when doing an update (adding a document) with IndexWriter.
> Everything is synchronized so that they are closed only when  
> MultiReader is not being
> used. This MultiReader is the only IndexReader we export in the  
> interface and
> has a count number which is being incremented when an indexReader is
> requested and decremented when that indexreader is closed. Remember  
> the MultiReader
> is not really closed. When one of the 2 underlying readers is closed,  
> we assign
> a new MultiReader to the variable holding it.
>
> So, the problem is that randomly, but oftenly, when we are doing a  
> close on the
> IndexWriter (after adding a document), we get an "docs out of order"  
> exception.
> Problem seems to be with some SegmentMergeInfos in the Working FS  
> directory
> and some SegmentMergeInfos in the internal RAMDirectory of the  
> IndexWriter.
>
> Have any of you got that "docs out of order" exception and know what  
> is causing it?
> Searching in Lucene mailing-list we saw little reference to that  
> exception
> (marking it as a lucene bug, but no answer on how to deal with it).
> We have to get this problem solved by Monday, so ANY help will be  
> appreciated.
>
> Thanks in advance.
>
> Alexis Rodriguez, from Novamens S.A.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message