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

Reply via email to