Class IndexFieldData.XFieldComparatorSource
- java.lang.Object
-
- org.apache.lucene.search.FieldComparatorSource
-
- org.elasticsearch.index.fielddata.IndexFieldData.XFieldComparatorSource
-
- Direct Known Subclasses:
BytesRefFieldComparatorSource,DoubleValuesComparatorSource,FloatValuesComparatorSource,LongValuesComparatorSource
- Enclosing interface:
- IndexFieldData<FD extends AtomicFieldData>
public abstract static class IndexFieldData.XFieldComparatorSource extends FieldComparatorSource
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIndexFieldData.XFieldComparatorSource.NestedSimple wrapper class around a filter that matches parent documents and a filter that matches child documents.
-
Field Summary
Fields Modifier and Type Field Description protected ObjectmissingValueprotected IndexFieldData.XFieldComparatorSource.Nestednestedprotected MultiValueModesortMode
-
Constructor Summary
Constructors Constructor Description XFieldComparatorSource(Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ObjectmissingObject(Object missingValue, boolean reversed)Return the missing object value according to the reduced type of the comparator.ObjectmissingValue(boolean reversed)Return a missing value that is understandable bySortField.setMissingValue(Object).IndexFieldData.XFieldComparatorSource.Nestednested()abstract SortField.TypereducedType()booleansortMissingFirst(Object missingValue)Whether missing values should be sorted first.booleansortMissingLast(Object missingValue)Whether missing values should be sorted last, this is the default.MultiValueModesortMode()-
Methods inherited from class org.apache.lucene.search.FieldComparatorSource
newComparator
-
-
-
-
Field Detail
-
sortMode
protected final MultiValueMode sortMode
-
missingValue
protected final Object missingValue
-
nested
protected final IndexFieldData.XFieldComparatorSource.Nested nested
-
-
Constructor Detail
-
XFieldComparatorSource
public XFieldComparatorSource(Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested)
-
-
Method Detail
-
sortMode
public MultiValueMode sortMode()
-
nested
public IndexFieldData.XFieldComparatorSource.Nested nested()
-
sortMissingFirst
public final boolean sortMissingFirst(Object missingValue)
Whether missing values should be sorted first.
-
sortMissingLast
public final boolean sortMissingLast(Object missingValue)
Whether missing values should be sorted last, this is the default.
-
missingObject
public final Object missingObject(Object missingValue, boolean reversed)
Return the missing object value according to the reduced type of the comparator.
-
reducedType
public abstract SortField.Type reducedType()
-
missingValue
public Object missingValue(boolean reversed)
Return a missing value that is understandable bySortField.setMissingValue(Object). Most implementations return null because they already replace the value at the fielddata level. However this can't work in case of strings since there is no such thing as a string which compares greater than any other string, so in that case we need to returnSortField.STRING_FIRSTorSortField.STRING_LASTso that the coordinating node knows how to deal with null values.
-
-