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 classExpressionValueSourceParser.SolrBindingsA bindings class that uses schema fields to resolve variables.
-
Field Summary
Fields Modifier and Type Field Description static StringEXPRESSION_KEYstatic StringSCORE_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 voidinit(org.apache.solr.common.util.NamedList<?> args)initwill be called just once, immediately after creation.org.apache.lucene.queries.function.ValueSourceparse(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:NamedListInitializedPlugininitwill 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:ValueSourceParserParse the user input into a ValueSource.- Specified by:
parsein classValueSourceParser- Throws:
SyntaxError
-
-