public class ToParentBlockJoinSortField extends SortField
SortField.Type
FIELD_DOC, FIELD_SCORE, missingValue, STRING_FIRST, STRING_LAST
Constructor and Description |
---|
ToParentBlockJoinSortField(String field,
SortField.Type type,
boolean reverse,
boolean order,
Filter parentFilter,
Filter childFilter)
Create ToParentBlockJoinSortField.
|
ToParentBlockJoinSortField(String field,
SortField.Type type,
boolean reverse,
Filter parentFilter,
Filter childFilter)
Create ToParentBlockJoinSortField.
|
Modifier and Type | Method and Description |
---|---|
FieldComparator<?> |
getComparator(int numHits,
int sortPos)
Returns the
FieldComparator to use for
sorting. |
equals, getBytesComparator, getComparatorSource, getField, getParser, getReverse, getType, hashCode, needsScores, rewrite, setBytesComparator, setMissingValue, toString
public ToParentBlockJoinSortField(String field, SortField.Type type, boolean reverse, Filter parentFilter, Filter childFilter)
field
- The sort field on the nested / child level.type
- The sort type on the nested / child level.reverse
- Whether natural order should be reversed on the nested / child level.parentFilter
- Filter that identifies the parent documents.childFilter
- Filter that defines which child documents participates in sorting.public ToParentBlockJoinSortField(String field, SortField.Type type, boolean reverse, boolean order, Filter parentFilter, Filter childFilter)
field
- The sort field on the nested / child level.type
- The sort type on the nested / child level.reverse
- Whether natural order should be reversed on the nested / child document level.order
- Whether natural order should be reversed on the parent level.parentFilter
- Filter that identifies the parent documents.childFilter
- Filter that defines which child documents participates in sorting.public FieldComparator<?> getComparator(int numHits, int sortPos) throws IOException
SortField
FieldComparator
to use for
sorting.getComparator
in class SortField
numHits
- number of top hits the queue will storesortPos
- position of this SortField within Sort
. The comparator is primary if sortPos==0,
secondary if sortPos==1, etc. Some comparators can
optimize themselves when they are the primary sort.FieldComparator
to use when sortingIOException
Copyright © 2000-2015 The Apache Software Foundation. All Rights Reserved.