Package com.yahoo.search.yql
Class YqlParser
- java.lang.Object
-
- com.yahoo.search.yql.YqlParser
-
- All Implemented Interfaces:
Parser
public class YqlParser extends java.lang.Object implements Parser
The YQL query language.This class must be kept in lockstep with
VespaSerializer
. Adding anything here will usually require a corresponding addition in VespaSerializer.- Author:
- Steinar Knutsen, Stian Kristoffersen, Simon Thoresen Hult
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
END_ANCHOR
static java.lang.String
SORTING_FUNCTION
static java.lang.String
SORTING_LOCALE
static java.lang.String
SORTING_STRENGTH
static java.lang.String
START_ANCHOR
-
Constructor Summary
Constructors Constructor Description YqlParser(ParserEnvironment environment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<VespaGroupingStep>
getGroupingSteps()
java.lang.Integer
getHits()
Give the number of hits expected from the latest parsed query if anything is explicitly specified.java.lang.Integer
getOffset()
Give the offset expected from the latest parsed query if anything is explicitly specified.Sorting
getSorting()
The sorting specified in the YQL+ query last parsed.java.lang.Integer
getTimeout()
The timeout specified in the YQL+ query last parsed.java.util.Set<java.lang.String>
getYqlSummaryFields()
boolean
isQueryParser()
QueryTree
parse(Parsable query)
void
setQueryParser(boolean queryParser)
void
setUserQuery(Query userQuery)
-
-
-
Field Detail
-
START_ANCHOR
public static final java.lang.String START_ANCHOR
- See Also:
- Constant Field Values
-
END_ANCHOR
public static final java.lang.String END_ANCHOR
- See Also:
- Constant Field Values
-
SORTING_FUNCTION
public static final java.lang.String SORTING_FUNCTION
- See Also:
- Constant Field Values
-
SORTING_LOCALE
public static final java.lang.String SORTING_LOCALE
- See Also:
- Constant Field Values
-
SORTING_STRENGTH
public static final java.lang.String SORTING_STRENGTH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
YqlParser
public YqlParser(ParserEnvironment environment)
-
-
Method Detail
-
isQueryParser
@Beta public boolean isQueryParser()
-
setQueryParser
@Beta public void setQueryParser(boolean queryParser)
-
setUserQuery
@Beta public void setUserQuery(Query userQuery)
-
getYqlSummaryFields
@Beta public java.util.Set<java.lang.String> getYqlSummaryFields()
-
getGroupingSteps
@Beta public java.util.List<VespaGroupingStep> getGroupingSteps()
-
getOffset
public java.lang.Integer getOffset()
Give the offset expected from the latest parsed query if anything is explicitly specified.- Returns:
- an Integer instance or null
-
getHits
public java.lang.Integer getHits()
Give the number of hits expected from the latest parsed query if anything is explicitly specified.- Returns:
- an Integer instance or null
-
getTimeout
public java.lang.Integer getTimeout()
The timeout specified in the YQL+ query last parsed.- Returns:
- an Integer instance or null
-
getSorting
public Sorting getSorting()
The sorting specified in the YQL+ query last parsed.- Returns:
- a Sorting instance or null
-
-