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
-
-
Constructor Summary
Constructors Constructor Description NvlValueSourceParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
init(org.apache.solr.common.util.NamedList<?> args)
org.apache.lucene.queries.function.ValueSource
parse(org.apache.solr.search.FunctionQParser fp)
-
-
-
Method Detail
-
parse
public org.apache.lucene.queries.function.ValueSource parse(org.apache.solr.search.FunctionQParser fp) throws org.apache.solr.search.SyntaxError
- Specified by:
parse
in classorg.apache.solr.search.ValueSourceParser
- Throws:
org.apache.solr.search.SyntaxError
-
init
public void init(org.apache.solr.common.util.NamedList<?> args)
-
-