org.apache.lucene.search.join
Class ToParentBlockJoinSortField
java.lang.Object
org.apache.lucene.search.SortField
org.apache.lucene.search.join.ToParentBlockJoinSortField
public class ToParentBlockJoinSortField
- extends SortField
A special sort field that allows sorting parent docs based on nested / child level fields.
Based on the sort order it either takes the document with the lowest or highest field value into account.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
Methods inherited from class org.apache.lucene.search.SortField |
equals, getBytesComparator, getComparatorSource, getField, getParser, getReverse, getType, hashCode, needsScores, rewrite, setBytesComparator, setMissingValue, toString |
ToParentBlockJoinSortField
public ToParentBlockJoinSortField(String field,
SortField.Type type,
boolean reverse,
Filter parentFilter,
Filter childFilter)
- Create ToParentBlockJoinSortField. The parent document ordering is based on child document ordering (reverse).
- Parameters:
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.
ToParentBlockJoinSortField
public ToParentBlockJoinSortField(String field,
SortField.Type type,
boolean reverse,
boolean order,
Filter parentFilter,
Filter childFilter)
- Create ToParentBlockJoinSortField.
- Parameters:
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.
getComparator
public FieldComparator<?> getComparator(int numHits,
int sortPos)
throws IOException
- Overrides:
getComparator
in class SortField
- Throws:
IOException
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.