You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Ravikumar Govindarajan <ra...@gmail.com> on 2013/12/04 06:41:31 UTC

SortingMergePolicy for index-block-joins

I am trying to find an optimal way of merging two already sorted segments
and need some help here...

My use-case is this:

Segment1 [Segment already sorted by Field "F1"]
                <Parent-Doc>
                             Fields: F1, F2, F3
                 List<Child-Docs>
                             Fields: C1, C2

Segment2 [Segment already sorted by Field "F1"]
                <Parent-Doc>
                             Fields: F1, F2, F3
                 List<Child-Docs>
                             Fields: C1, C2


I want to merge individually-sorted Segment1 & Segment2 based on field "F1".

SortingMergePolicy will greatly help here. But if you notice, my child-docs
don't have field "F1". Will it work correctly?

Another doubt I had was, since these 2 segments are individually-sorted, is
it possible to merge these 2 segments with a leap-frog-enumerator [based on
field F1] instead of SortingMergePolicy?

--
Ravi