class ExpressionConverter extends Object
RequestBuilder
that offloads the code to convert GroupingExpression
type
objects to back-end specific expressions. This is a straightforward one-to-one conversion.Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_SUMMARY_NAME |
static int |
DEFAULT_TIME_OFFSET |
private String |
defaultSummaryName |
private int |
timeOffset |
Constructor and Description |
---|
ExpressionConverter() |
Modifier and Type | Method and Description |
---|---|
private com.yahoo.searchlib.expression.MultiArgFunctionNode |
addArguments(com.yahoo.searchlib.expression.MultiArgFunctionNode ret,
Iterable<GroupingExpression> lst) |
ExpressionConverter |
setDefaultSummaryName(String summaryName)
Sets the summary name to use when converting
SummaryValue that was created without an explicit name. |
ExpressionConverter |
setTimeOffset(int millis)
Sets an offset to use for all time-based grouping expressions.
|
com.yahoo.searchlib.aggregation.AggregationResult |
toAggregationResult(GroupingExpression exp)
Converts the given ast type grouping expression to a corresponding back-end type aggregation result.
|
private com.yahoo.searchlib.expression.BucketResultNode |
toBucket(GroupingExpression exp) |
private com.yahoo.searchlib.expression.ResultNodeVector |
toBucketList(PredefinedFunction fnc) |
com.yahoo.searchlib.expression.ExpressionNode |
toExpressionNode(GroupingExpression exp)
Converts the given ast type grouping expression to a corresponding back-end type expression.
|
private com.yahoo.searchlib.expression.MultiArgFunctionNode |
toSubNode(Iterable<GroupingExpression> lst) |
private com.yahoo.searchlib.expression.TimeStampFunctionNode |
toTime(GroupingExpression arg,
com.yahoo.searchlib.expression.TimeStampFunctionNode.TimePart timePart) |
public static final String DEFAULT_SUMMARY_NAME
public static final int DEFAULT_TIME_OFFSET
private String defaultSummaryName
private int timeOffset
public ExpressionConverter setDefaultSummaryName(String summaryName)
SummaryValue
that was created without an explicit name.summaryName
- The default summary name to use.public ExpressionConverter setTimeOffset(int millis)
millis
- The offset in milliseconds.public com.yahoo.searchlib.aggregation.AggregationResult toAggregationResult(GroupingExpression exp)
exp
- The expression to convert.UnsupportedOperationException
- Thrown if the given expression could not be converted.public com.yahoo.searchlib.expression.ExpressionNode toExpressionNode(GroupingExpression exp)
exp
- The expression to convert.UnsupportedOperationException
- Thrown if the given expression could not be converted.private com.yahoo.searchlib.expression.TimeStampFunctionNode toTime(GroupingExpression arg, com.yahoo.searchlib.expression.TimeStampFunctionNode.TimePart timePart)
private com.yahoo.searchlib.expression.MultiArgFunctionNode addArguments(com.yahoo.searchlib.expression.MultiArgFunctionNode ret, Iterable<GroupingExpression> lst)
private com.yahoo.searchlib.expression.MultiArgFunctionNode toSubNode(Iterable<GroupingExpression> lst)
private com.yahoo.searchlib.expression.ResultNodeVector toBucketList(PredefinedFunction fnc)
private com.yahoo.searchlib.expression.BucketResultNode toBucket(GroupingExpression exp)
Copyright © 2018. All rights reserved.