public class DefFunction extends MultiFunction
ValueSource
implementation which only returns the values from the provided
ValueSources which are available for a particular docId. Consequently, when combined
with a ConstValueSource
, this function serves as a way to return a default
value when the values for a field are unavailable.MultiFunction.Values
sources
Constructor and Description |
---|
DefFunction(java.util.List<ValueSource> sources) |
Modifier and Type | Method and Description |
---|---|
FunctionValues |
getValues(java.util.Map fcontext,
LeafReaderContext readerContext)
Gets the values for this reader and the context that was previously
passed to createWeight().
|
protected java.lang.String |
name() |
allExists, allExists, anyExists, anyExists, createWeight, description, description, equals, hashCode, toString, valsArr
asDoubleValuesSource, asLongValuesSource, fromDoubleValuesSource, getSortField, newContext, toString
public DefFunction(java.util.List<ValueSource> sources)
protected java.lang.String name()
name
in class MultiFunction
public FunctionValues getValues(java.util.Map fcontext, LeafReaderContext readerContext) throws java.io.IOException
ValueSource
getValues
in class ValueSource
java.io.IOException
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.