public class SortedSetFieldSource extends FieldCacheSource
FunctionValues
instances for multi-valued string based fields.
A SortedSetDocValues contains multiple values for a field, so this technique "selects" a value as the representative value for the document.
SortedSetSelector
Modifier and Type | Field and Description |
---|---|
protected SortedSetSelector.Type |
selector |
field
Constructor and Description |
---|
SortedSetFieldSource(String field) |
SortedSetFieldSource(String field,
SortedSetSelector.Type selector) |
Modifier and Type | Method and Description |
---|---|
String |
description()
description of field, used in explain()
|
boolean |
equals(Object obj) |
SortField |
getSortField(boolean reverse)
EXPERIMENTAL: This method is subject to change.
|
FunctionValues |
getValues(Map context,
LeafReaderContext readerContext)
Gets the values for this reader and the context that was previously
passed to createWeight().
|
int |
hashCode() |
getField
asDoubleValuesSource, asLongValuesSource, createWeight, fromDoubleValuesSource, newContext, toString
protected final SortedSetSelector.Type selector
public SortedSetFieldSource(String field)
public SortedSetFieldSource(String field, SortedSetSelector.Type selector)
public SortField getSortField(boolean reverse)
ValueSource
Get the SortField for this ValueSource. Uses the ValueSource.getValues(java.util.Map, org.apache.lucene.index.LeafReaderContext)
to populate the SortField.
getSortField
in class ValueSource
reverse
- true if this is a reverse sort.SortField
for the ValueSourcepublic FunctionValues getValues(Map context, LeafReaderContext readerContext) throws IOException
ValueSource
getValues
in class ValueSource
IOException
public String description()
ValueSource
description
in class FieldCacheSource
public int hashCode()
hashCode
in class FieldCacheSource
public boolean equals(Object obj)
equals
in class FieldCacheSource
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.