Package org.apache.solr.search.function
Class NvlValueSourceParser
java.lang.Object
org.apache.solr.search.ValueSourceParser
org.apache.solr.search.function.NvlValueSourceParser
- All Implemented Interfaces:
org.apache.solr.util.plugin.NamedListInitializedPlugin
public class NvlValueSourceParser
extends org.apache.solr.search.ValueSourceParser
A sample ValueSourceParser for testing. Approximates the oracle NVL function, letting you
substitute a value when a "null" is encountered. In this case, null is approximated by a float
value, since ValueSource always returns a float, even if the field is undefined for a document.
Initialization parameters: - nvlFloatValue: float value to consider as "NULL" when seen in a field. defaults to 0.0f.
Example: nvl(vs,2) will return 2 if the vs is NULL (as defined by nvlFloatValue above) or the doc value otherwise
-
Field Summary
Fields inherited from class org.apache.solr.search.ValueSourceParser
standardValueSourceParsers -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
NvlValueSourceParser
public NvlValueSourceParser()
-
-
Method Details
-
parse
public org.apache.lucene.queries.function.ValueSource parse(org.apache.solr.search.FunctionQParser fp) throws org.apache.solr.search.SyntaxError - Specified by:
parsein classorg.apache.solr.search.ValueSourceParser- Throws:
org.apache.solr.search.SyntaxError
-
init
public void init(org.apache.solr.common.util.NamedList<?> args)
-