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 java.util.List<ValueSource> |
sources |
| Constructor and Description |
|---|
MultiFunction(java.util.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)
Equivalent to 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)
Equivalent to the
FunctionValues[] method with the same name, but optimized for
dealing with exactly 2 arguments. |
void |
createWeight(java.util.Map context,
IndexSearcher searcher)
Implementations should propagate createWeight to sub-ValueSources which can optionally store
weight info in the context.
|
java.lang.String |
description()
description of field, used in explain()
|
static java.lang.String |
description(java.lang.String name,
java.util.List<ValueSource> sources) |
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
protected abstract java.lang.String |
name() |
static java.lang.String |
toString(java.lang.String name,
FunctionValues[] valsArr,
int doc) |
static FunctionValues[] |
valsArr(java.util.List<ValueSource> sources,
java.util.Map fcontext,
LeafReaderContext readerContext) |
asDoubleValuesSource, asLongValuesSource, fromDoubleValuesSource, getSortField, getValues, newContext, toStringprotected final java.util.List<ValueSource> sources
public MultiFunction(java.util.List<ValueSource> sources)
protected abstract java.lang.String name()
public java.lang.String description()
ValueSourcedescription in class ValueSourcepublic static boolean allExists(int doc,
FunctionValues[] values)
throws java.io.IOException
FunctionValuesvalues
FunctionValues.exists(int) for the specified doc, else false.java.io.IOExceptionpublic static boolean anyExists(int doc,
FunctionValues[] values)
throws java.io.IOException
FunctionValuesvalues
FunctionValues.exists(int) for the specified doc, else false.java.io.IOExceptionpublic static boolean allExists(int doc,
FunctionValues values1,
FunctionValues values2)
throws java.io.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.java.io.IOExceptionanyExists(int,FunctionValues[])public static boolean anyExists(int doc,
FunctionValues values1,
FunctionValues values2)
throws java.io.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.java.io.IOExceptionanyExists(int,FunctionValues[])public static java.lang.String description(java.lang.String name,
java.util.List<ValueSource> sources)
public static FunctionValues[] valsArr(java.util.List<ValueSource> sources, java.util.Map fcontext, LeafReaderContext readerContext) throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String toString(java.lang.String name,
FunctionValues[] valsArr,
int doc)
throws java.io.IOException
java.io.IOExceptionpublic void createWeight(java.util.Map context,
IndexSearcher searcher)
throws java.io.IOException
ValueSourcecreateWeight in class ValueSourcejava.io.IOExceptionpublic int hashCode()
hashCode in class ValueSourcepublic boolean equals(java.lang.Object o)
equals in class ValueSourceCopyright © 2000–2025 The Apache Software Foundation. All rights reserved.