public abstract static class IndexFieldData.XFieldComparatorSource
extends org.apache.lucene.search.FieldComparatorSource
Modifier and Type | Class and Description |
---|---|
static class |
IndexFieldData.XFieldComparatorSource.Nested
Simple wrapper class around a filter that matches parent documents
and a filter that matches child documents.
|
Modifier and Type | Field and Description |
---|---|
protected java.lang.Object |
missingValue |
protected IndexFieldData.XFieldComparatorSource.Nested |
nested |
protected MultiValueMode |
sortMode |
Constructor and Description |
---|
XFieldComparatorSource(java.lang.Object missingValue,
MultiValueMode sortMode,
IndexFieldData.XFieldComparatorSource.Nested nested) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
missingObject(java.lang.Object missingValue,
boolean reversed)
Return the missing object value according to the reduced type of the comparator.
|
java.lang.Object |
missingValue(boolean reversed)
Return a missing value that is understandable by
SortField.setMissingValue(Object) . |
IndexFieldData.XFieldComparatorSource.Nested |
nested() |
abstract org.apache.lucene.search.SortField.Type |
reducedType() |
boolean |
sortMissingFirst(java.lang.Object missingValue)
Whether missing values should be sorted first.
|
boolean |
sortMissingLast(java.lang.Object missingValue)
Whether missing values should be sorted last, this is the default.
|
MultiValueMode |
sortMode() |
protected final MultiValueMode sortMode
protected final java.lang.Object missingValue
protected final IndexFieldData.XFieldComparatorSource.Nested nested
public XFieldComparatorSource(java.lang.Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested)
public MultiValueMode sortMode()
public IndexFieldData.XFieldComparatorSource.Nested nested()
public final boolean sortMissingFirst(java.lang.Object missingValue)
public final boolean sortMissingLast(java.lang.Object missingValue)
public final java.lang.Object missingObject(java.lang.Object missingValue, boolean reversed)
public abstract org.apache.lucene.search.SortField.Type reducedType()
public java.lang.Object missingValue(boolean reversed)
SortField.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 return
SortField.STRING_FIRST
or SortField.STRING_LAST
so that the coordinating node
knows how to deal with null values.