lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <ysee...@gmail.com>
Subject Re: Lucene Document order not being maintained?
Date Wed, 05 Apr 2006 22:57:03 GMT
Spoke too soon... the loop counter goes down to zero, but it looks
like the segments are added in order.

      for (int i = input.readInt(); i > 0; i--) { // read segmentInfos
        SegmentInfo si =
          new SegmentInfo(input.readString(), input.readInt(), directory);
        addElement(si);
      }

On 4/5/06, Yonik Seeley <yseeley@gmail.com> wrote:
> Ah Ha! I found the problem.
>
> SegmentInfos.read(Directory directory) reads the segment info in reverse order!
> I gotta go home now... I'll look into the right fix later (it depends
> on what else uses that method...)
>
> FYI, I managed to reproduce it with only 3 documents in each index.

-Yonik
http://incubator.apache.org/solr Solr, The Open Source Lucene Search Server

---------------------------------------------------------------------
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