public abstract class BlockJoinSorter extends Sorter
Sorter.DocComparator, Sorter.DocMap
Modifier and Type | Field and Description |
---|---|
protected Filter |
parentsFilter |
INDEX_ORDER_COMPARATOR, REVERSE_DOCS
Constructor and Description |
---|
BlockJoinSorter(Filter parentsFilter)
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
protected Sorter.DocComparator |
getChildComparator(AtomicReader reader)
Return a
Sorter.DocComparator instance that will be called on
children of the same parent. |
protected abstract Sorter.DocComparator |
getParentComparator(AtomicReader reader)
Return a
Sorter.DocComparator instance that will be called on
parent doc IDs. |
Sorter.DocMap |
sort(AtomicReader reader)
Returns a mapping from the old document ID to its new location in the
sorted index.
|
protected final Filter parentsFilter
public BlockJoinSorter(Filter parentsFilter)
protected abstract Sorter.DocComparator getParentComparator(AtomicReader reader)
Sorter.DocComparator
instance that will be called on
parent doc IDs.protected Sorter.DocComparator getChildComparator(AtomicReader reader)
Sorter.DocComparator
instance that will be called on
children of the same parent. By default, children of the same parent are
not reordered.public final Sorter.DocMap sort(AtomicReader reader) throws IOException
Sorter
Sorter.sort(int, DocComparator)
to compute the old-to-new permutation
given a list of documents and their corresponding values.
A return value of null is allowed and means that
reader
is already sorted.
NOTE: deleted documents are expected to appear in the mapping as well, they will however be marked as deleted in the sorted view.
sort
in class Sorter
IOException
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.