Class ReplaceFunction
- java.lang.Object
-
- org.apache.solr.analytics.function.mapping.ReplaceFunction
-
public class ReplaceFunction extends Object
A mapping function to replace anAnalyticsValue
from anAnalyticsValue
or anAnalyticsValueStream
with a differentAnalyticsValue
. For each document, all values from the base parameter matching the comparison parameter will be replaced with the fill parameter.The first parameter can be any type of analytics expression. If the parameter is multi-valued, then the return will be multi-valued. (Required)
The second parameter, which is the value to compare to the first parameter, must be anAnalyticsValue
, aka single-valued. (Required)
The third parameter, which is the value to fill the first parameter with, must be anAnalyticsValue
, aka single-valued. (Required)The resulting Value or ValueStream will be typed with the closest super-type of the three parameters. (e.g. "replace"(double,int,float) will return a double)
-
-
Field Summary
Fields Modifier and Type Field Description static ExpressionFactory.CreatorFunction
creatorFunction
static String
name
-
Constructor Summary
Constructors Constructor Description ReplaceFunction()
-
-
-
Field Detail
-
name
public static final String name
- See Also:
- Constant Field Values
-
creatorFunction
public static final ExpressionFactory.CreatorFunction creatorFunction
-
-