Class StatementExpression
java.lang.Object
com.yahoo.vespa.objects.Selectable
com.yahoo.vespa.indexinglanguage.expressions.Expression
com.yahoo.vespa.indexinglanguage.expressions.CompositeExpression
com.yahoo.vespa.indexinglanguage.expressions.ExpressionList<Expression>
com.yahoo.vespa.indexinglanguage.expressions.StatementExpression
- All Implemented Interfaces:
Iterable<Expression>
An indexing statement consisting of a list of indexing expressions, e.g "input foo | index | attribute".
- Author:
- Simon Thoresen Hult
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertChildren(ExpressionConverter converter) Returns an expression where the children of this has been converted using the given converter.protected voiddoExecute(ExecutionContext context) protected voiddoResolve(TypeContext context) booleanstatic StatementExpressionfromString(String expression) Creates an expression with simple lingustics for testingstatic StatementExpressionfromString(String expression, com.yahoo.language.Linguistics linguistics, Map<String, com.yahoo.language.process.Chunker> chunkers, Map<String, com.yahoo.language.process.Embedder> embedders, Map<String, com.yahoo.language.process.FieldGenerator> generators) static StatementExpressionfromString(String expression, com.yahoo.language.Linguistics linguistics, Map<String, com.yahoo.language.process.Embedder> embedders) Returns the input fields which are (perhaps optionally) consumed by some expression in this statement.booleanReturns whether this expression outputs a different value than what it gets as input.static StatementExpressionnewInstance(ScriptParserContext config) com.yahoo.document.DataTypesetInputType(com.yahoo.document.DataType input, TypeContext context) Sets the input type of this and returns the resulting output type, or null if it cannot be uniquely determined.com.yahoo.document.DataTypesetOutputType(com.yahoo.document.DataType output, TypeContext context) Sets the output type of this and returns the resulting input type, or null if it cannot be uniquely determined.toString()Methods inherited from class com.yahoo.vespa.indexinglanguage.expressions.ExpressionList
asList, convertChildList, expressions, get, hashCode, isEmpty, iterator, requiresInput, selectMembers, setStatementOutput, sizeMethods inherited from class com.yahoo.vespa.indexinglanguage.expressions.CompositeExpression
toScriptBlockMethods inherited from class com.yahoo.vespa.indexinglanguage.expressions.Expression
execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, getInputType, getOutputType, getOutputType, leastGeneralNonNullOf, leastGeneralOf, mostGeneralOf, requireOutputType, resolve, resolve, resolve, resolve, resolve, resolve, resolve, resolve, resolve, setInputType, setOutputTypeMethods inherited from class com.yahoo.vespa.objects.Selectable
select, selectMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
StatementExpression
-
StatementExpression
-
-
Method Details
-
isMutating
public boolean isMutating()Description copied from class:ExpressionReturns whether this expression outputs a different value than what it gets as input. Annotating a string value does not count as modifying it.- Overrides:
isMutatingin classExpression
-
getInputFields
Returns the input fields which are (perhaps optionally) consumed by some expression in this statement. -
convertChildren
Description copied from class:ExpressionReturns an expression where the children of this has been converted using the given converter. This default implementation returns this as it has no children.- Specified by:
convertChildrenin classCompositeExpression
-
setInputType
public com.yahoo.document.DataType setInputType(com.yahoo.document.DataType input, TypeContext context) Description copied from class:ExpressionSets the input type of this and returns the resulting output type, or null if it cannot be uniquely determined. Subtypes may implement this by calling setInputType(inputType, requiredType, VerificationContext context).- Overrides:
setInputTypein classExpression
-
setOutputType
public com.yahoo.document.DataType setOutputType(com.yahoo.document.DataType output, TypeContext context) Description copied from class:ExpressionSets the output type of this and returns the resulting input type, or null if it cannot be uniquely determined. Subtypes implement this by calling setOutputType(outputType, requiredType, VerificationContext context).- Overrides:
setOutputTypein classExpression
-
doResolve
- Overrides:
doResolvein classExpression
-
doExecute
- Specified by:
doExecutein classExpression
-
toString
-
equals
- Overrides:
equalsin classExpressionList<Expression>
-
fromString
Creates an expression with simple lingustics for testing- Throws:
ParseException
-
fromString
public static StatementExpression fromString(String expression, com.yahoo.language.Linguistics linguistics, Map<String, com.yahoo.language.process.Embedder> embedders) throws ParseException- Throws:
ParseException
-
fromString
public static StatementExpression fromString(String expression, com.yahoo.language.Linguistics linguistics, Map<String, com.yahoo.language.process.Chunker> chunkers, Map<String, throws ParseExceptioncom.yahoo.language.process.Embedder> embedders, Map<String, com.yahoo.language.process.FieldGenerator> generators) - Throws:
ParseException
-
newInstance
- Throws:
ParseException
-