Package org.apache.solr.search
Class ExpressionValueSourceParser
- java.lang.Object
-
- org.apache.solr.search.ValueSourceParser
-
- org.apache.solr.search.ExpressionValueSourceParser
-
- All Implemented Interfaces:
NamedListInitializedPlugin
public class ExpressionValueSourceParser extends ValueSourceParser
A ValueSource parser configured with a pre-compiled expression that can then be evaluated at request time. It's powered by the Lucene Expressions module, which is a subset of JavaScript.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ExpressionValueSourceParser.SolrBindings
A bindings class that uses schema fields to resolve variables.
-
Field Summary
Fields Modifier and Type Field Description static String
EXPRESSION_KEY
static String
SCORE_KEY
-
Fields inherited from class org.apache.solr.search.ValueSourceParser
standardValueSourceParsers
-
-
Constructor Summary
Constructors Constructor Description ExpressionValueSourceParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
init(org.apache.solr.common.util.NamedList<?> args)
init
will be called just once, immediately after creation.org.apache.lucene.queries.function.ValueSource
parse(FunctionQParser fp)
Parse the user input into a ValueSource.
-
-
-
Field Detail
-
SCORE_KEY
public static final String SCORE_KEY
- See Also:
- Constant Field Values
-
EXPRESSION_KEY
public static final String EXPRESSION_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(org.apache.solr.common.util.NamedList<?> args)
Description copied from interface:NamedListInitializedPlugin
init
will be called just once, immediately after creation.Source of the initialization arguments will typically be solrconfig.xml, but will ultimately depends on the plugin itself
- Parameters:
args
- non-null list of initialization parameters (may be empty)
-
parse
public org.apache.lucene.queries.function.ValueSource parse(FunctionQParser fp) throws SyntaxError
Description copied from class:ValueSourceParser
Parse the user input into a ValueSource.- Specified by:
parse
in classValueSourceParser
- Throws:
SyntaxError
-
-