lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ramprakash Ramamoorthy <youngestachie...@gmail.com>
Subject Re: TieredMergePolicy and Doc ordering
Date Mon, 06 Jan 2014 05:29:47 GMT
Thank you Michael.


On Sat, Jan 4, 2014 at 3:53 PM, Michael McCandless <
lucene@mikemccandless.com> wrote:

> Lucene's internal docIDs will change their order, but often this
> doesn't matter and you won't see it.
>
> E.g. if you search and you're sorting by your ID field then Lucene's
> docID assignments has no effect.
>
> We receive data in increasing order of time. And we just retrieve the data
from the indexes in the order we write. It's a write-once index, no
deletions, no updates. We don't apply any sorting while getting the result
set. That said, does this mean I will have to apply a sort based on the ID
field to ensure order consistency in a tiered merge policy? Or can I move
to LogDocMergePolicy that doesn't change the docIds while merging? I have a
feeling that applying sort while searching might trade off my search
performance, because it's just write and retrieve in the same order in the
use case.

Hope, I'm making sense here. Thanks in advance.

It's only for tie-breaks where Lucene falls back to its docID to break the
> tie.
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
>
> On Fri, Jan 3, 2014 at 5:16 AM, Ramprakash Ramamoorthy
> <youngestachiever@gmail.com> wrote:
> > Team,
> >
> > I'm using Lucene 4.4 and am indexing my documents using
> TieredMergePolicy.
> > The documents I index have an incremental ID field. From the javadoc, I
> see
> > that, tiered merge policy merges non adjacent segments.
> >
> > However, when I try to search through in my test environment, I get the
> > search results in perfect order of incremental IDs. In case non adjacent
> > segments are merged, then there should be a change in order of the IDs
> > right? Or am I missing something?
> >
> >
> >
> > --
> > With Thanks and Regards,
> > Ramprakash Ramamoorthy,
> > Chennai, India.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>


-- 
With Thanks and Regards,
Ramprakash Ramamoorthy,
Member Technical Staff,
Zoho Corporation.
+91 9626975420

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message