lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexis Rodriguez <>
Subject "docs out of order exception" in Lucene. Please help.
Date Wed, 23 Mar 2005 22:21:16 GMT
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 
is not really closed. When one of the 2 underlying readers is closed, we 
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" 
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 

Thanks in advance.

Alexis Rodriguez, from Novamens S.A.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message