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(List<ValueSource> sources) |
Modifier and Type | Method and Description |
---|---|
FunctionValues |
getValues(Map fcontext,
LeafReaderContext readerContext)
Gets the values for this reader and the context that was previously
passed to createWeight()
|
protected String |
name() |
allExists, anyExists, createWeight, description, description, equals, hashCode, toString, valsArr
getSortField, newContext, toString
public DefFunction(List<ValueSource> sources)
protected String name()
name
in class MultiFunction
public FunctionValues getValues(Map fcontext, LeafReaderContext readerContext) throws IOException
ValueSource
getValues
in class ValueSource
IOException
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.