public abstract class MultiFunction extends ValueSource
ValueSource implementations that wrap multiple
ValueSources and apply their own logic.| Modifier and Type | Class and Description |
|---|---|
class |
MultiFunction.Values |
| Modifier and Type | Field and Description |
|---|---|
protected List<ValueSource> |
sources |
| Constructor and Description |
|---|
MultiFunction(List<ValueSource> sources) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
allExists(int doc,
FunctionValues[] values)
Helper utility for
FunctionValues |
static boolean |
allExists(int doc,
FunctionValues values1,
FunctionValues values2)
Equivilent the the
FunctionValues[] method with the same name, but optimized for
dealing with exactly 2 arguments. |
static boolean |
anyExists(int doc,
FunctionValues[] values)
Helper utility for
FunctionValues |
static boolean |
anyExists(int doc,
FunctionValues values1,
FunctionValues values2)
Equivilent the the
FunctionValues[] method with the same name, but optimized for
dealing with exactly 2 arguments. |
void |
createWeight(Map context,
IndexSearcher searcher)
Implementations should propagate createWeight to sub-ValueSources which can optionally store
weight info in the context.
|
String |
description()
description of field, used in explain()
|
static String |
description(String name,
List<ValueSource> sources) |
boolean |
equals(Object o) |
int |
hashCode() |
protected abstract String |
name() |
static String |
toString(String name,
FunctionValues[] valsArr,
int doc) |
static FunctionValues[] |
valsArr(List<ValueSource> sources,
Map fcontext,
LeafReaderContext readerContext) |
asDoubleValuesSource, asLongValuesSource, fromDoubleValuesSource, getSortField, getValues, newContext, toStringprotected final List<ValueSource> sources
public MultiFunction(List<ValueSource> sources)
protected abstract String name()
public String description()
ValueSourcedescription in class ValueSourcepublic static boolean allExists(int doc,
FunctionValues[] values)
throws IOException
FunctionValuesvalues
FunctionValues.exists(int) for the specified doc, else false.IOExceptionpublic static boolean anyExists(int doc,
FunctionValues[] values)
throws IOException
FunctionValuesvalues
FunctionValues.exists(int) for the specified doc, else false.IOExceptionpublic static boolean allExists(int doc,
FunctionValues values1,
FunctionValues values2)
throws IOException
FunctionValues[] method with the same name, but optimized for
dealing with exactly 2 arguments.values
FunctionValues.exists(int) for the specified doc, else false.IOExceptionanyExists(int,FunctionValues[])public static boolean anyExists(int doc,
FunctionValues values1,
FunctionValues values2)
throws IOException
FunctionValues[] method with the same name, but optimized for
dealing with exactly 2 arguments.values
FunctionValues.exists(int) for the specified doc, else false.IOExceptionanyExists(int,FunctionValues[])public static String description(String name, List<ValueSource> sources)
public static FunctionValues[] valsArr(List<ValueSource> sources, Map fcontext, LeafReaderContext readerContext) throws IOException
IOExceptionpublic static String toString(String name, FunctionValues[] valsArr, int doc) throws IOException
IOExceptionpublic void createWeight(Map context, IndexSearcher searcher) throws IOException
ValueSourcecreateWeight in class ValueSourceIOExceptionpublic int hashCode()
hashCode in class ValueSourcepublic boolean equals(Object o)
equals in class ValueSourceCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.