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
ACCENT_DROP
static java.lang.String
ALTERNATIVES
static java.lang.String
AND_SEGMENTING
static java.lang.String
ANNOTATIONS
static java.lang.String
APPROXIMATE
static java.lang.String
ASCENDING_HITS_ORDER
static java.lang.String
BOUNDS
static java.lang.String
BOUNDS_LEFT_OPEN
static java.lang.String
BOUNDS_OPEN
static java.lang.String
BOUNDS_RIGHT_OPEN
static java.lang.String
CONNECTION_ID
static java.lang.String
CONNECTION_WEIGHT
static java.lang.String
CONNECTIVITY
static java.lang.Integer
DEFAULT_TARGET_NUM_HITS
static java.lang.String
DESCENDING_HITS_ORDER
static java.lang.String
DISTANCE
static java.lang.String
DISTANCE_THRESHOLD
static java.lang.String
DOT_PRODUCT
static java.lang.String
END_ANCHOR
static java.lang.String
EQUIV
static java.lang.String
FILTER
static java.lang.String
GEO_LOCATION
static java.lang.String
HIT_LIMIT
static java.lang.String
HNSW_EXPLORE_ADDITIONAL_HITS
static java.lang.String
IMPLICIT_TRANSFORMS
static java.lang.String
LABEL
static java.lang.String
NEAR
static java.lang.String
NEAREST_NEIGHBOR
static java.lang.String
NFKC
static java.lang.String
NORMALIZE_CASE
static java.lang.String
ONEAR
static java.lang.String
ORIGIN
static java.lang.String
ORIGIN_LENGTH
static java.lang.String
ORIGIN_OFFSET
static java.lang.String
ORIGIN_ORIGINAL
static java.lang.String
PHRASE
static java.lang.String
PREDICATE
static java.lang.String
PREFIX
static java.lang.String
RANGE
static java.lang.String
RANK
static java.lang.String
RANKED
static java.lang.String
SAME_ELEMENT
static java.lang.String
SCORE_THRESHOLD
static java.lang.String
SIGNIFICANCE
static java.lang.String
SORTING_FUNCTION
static java.lang.String
SORTING_LOCALE
static java.lang.String
SORTING_STRENGTH
static java.lang.String
START_ANCHOR
static java.lang.String
STEM
static java.lang.String
SUBSTRING
static java.lang.String
SUFFIX
static java.lang.String
TARGET_HITS
static java.lang.String
TARGET_NUM_HITS
static java.lang.String
THRESHOLD_BOOST_FACTOR
static java.lang.String
UNIQUE_ID
static java.lang.String
URI
static java.lang.String
USE_POSITION_DATA
static java.lang.String
USER_INPUT_LANGUAGE
static java.lang.String
WAND
static java.lang.String
WEAK_AND
static java.lang.String
WEIGHT
static java.lang.String
WEIGHTED_SET
-
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
-
DESCENDING_HITS_ORDER
public static final java.lang.String DESCENDING_HITS_ORDER
- See Also:
- Constant Field Values
-
ASCENDING_HITS_ORDER
public static final java.lang.String ASCENDING_HITS_ORDER
- See Also:
- Constant Field Values
-
DEFAULT_TARGET_NUM_HITS
public static final java.lang.Integer DEFAULT_TARGET_NUM_HITS
-
ANNOTATIONS
public static final java.lang.String ANNOTATIONS
- See Also:
- Constant Field Values
-
NFKC
public static final java.lang.String NFKC
- See Also:
- Constant Field Values
-
USER_INPUT_LANGUAGE
public static final java.lang.String USER_INPUT_LANGUAGE
- See Also:
- Constant Field Values
-
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
-
ACCENT_DROP
public static final java.lang.String ACCENT_DROP
- See Also:
- Constant Field Values
-
ALTERNATIVES
public static final java.lang.String ALTERNATIVES
- See Also:
- Constant Field Values
-
AND_SEGMENTING
public static final java.lang.String AND_SEGMENTING
- See Also:
- Constant Field Values
-
APPROXIMATE
public static final java.lang.String APPROXIMATE
- See Also:
- Constant Field Values
-
BOUNDS
public static final java.lang.String BOUNDS
- See Also:
- Constant Field Values
-
BOUNDS_LEFT_OPEN
public static final java.lang.String BOUNDS_LEFT_OPEN
- See Also:
- Constant Field Values
-
BOUNDS_OPEN
public static final java.lang.String BOUNDS_OPEN
- See Also:
- Constant Field Values
-
BOUNDS_RIGHT_OPEN
public static final java.lang.String BOUNDS_RIGHT_OPEN
- See Also:
- Constant Field Values
-
CONNECTION_ID
public static final java.lang.String CONNECTION_ID
- See Also:
- Constant Field Values
-
CONNECTION_WEIGHT
public static final java.lang.String CONNECTION_WEIGHT
- See Also:
- Constant Field Values
-
CONNECTIVITY
public static final java.lang.String CONNECTIVITY
- See Also:
- Constant Field Values
-
DISTANCE
public static final java.lang.String DISTANCE
- See Also:
- Constant Field Values
-
DOT_PRODUCT
public static final java.lang.String DOT_PRODUCT
- See Also:
- Constant Field Values
-
EQUIV
public static final java.lang.String EQUIV
- See Also:
- Constant Field Values
-
FILTER
public static final java.lang.String FILTER
- See Also:
- Constant Field Values
-
GEO_LOCATION
public static final java.lang.String GEO_LOCATION
- See Also:
- Constant Field Values
-
HIT_LIMIT
public static final java.lang.String HIT_LIMIT
- See Also:
- Constant Field Values
-
DISTANCE_THRESHOLD
public static final java.lang.String DISTANCE_THRESHOLD
- See Also:
- Constant Field Values
-
HNSW_EXPLORE_ADDITIONAL_HITS
public static final java.lang.String HNSW_EXPLORE_ADDITIONAL_HITS
- See Also:
- Constant Field Values
-
IMPLICIT_TRANSFORMS
public static final java.lang.String IMPLICIT_TRANSFORMS
- See Also:
- Constant Field Values
-
LABEL
public static final java.lang.String LABEL
- See Also:
- Constant Field Values
-
NEAR
public static final java.lang.String NEAR
- See Also:
- Constant Field Values
-
NEAREST_NEIGHBOR
public static final java.lang.String NEAREST_NEIGHBOR
- See Also:
- Constant Field Values
-
NORMALIZE_CASE
public static final java.lang.String NORMALIZE_CASE
- See Also:
- Constant Field Values
-
ONEAR
public static final java.lang.String ONEAR
- See Also:
- Constant Field Values
-
ORIGIN_LENGTH
public static final java.lang.String ORIGIN_LENGTH
- See Also:
- Constant Field Values
-
ORIGIN_OFFSET
public static final java.lang.String ORIGIN_OFFSET
- See Also:
- Constant Field Values
-
ORIGIN
public static final java.lang.String ORIGIN
- See Also:
- Constant Field Values
-
ORIGIN_ORIGINAL
public static final java.lang.String ORIGIN_ORIGINAL
- See Also:
- Constant Field Values
-
PHRASE
public static final java.lang.String PHRASE
- See Also:
- Constant Field Values
-
PREDICATE
public static final java.lang.String PREDICATE
- See Also:
- Constant Field Values
-
PREFIX
public static final java.lang.String PREFIX
- See Also:
- Constant Field Values
-
RANGE
public static final java.lang.String RANGE
- See Also:
- Constant Field Values
-
RANKED
public static final java.lang.String RANKED
- See Also:
- Constant Field Values
-
RANK
public static final java.lang.String RANK
- See Also:
- Constant Field Values
-
SAME_ELEMENT
public static final java.lang.String SAME_ELEMENT
- See Also:
- Constant Field Values
-
SCORE_THRESHOLD
public static final java.lang.String SCORE_THRESHOLD
- See Also:
- Constant Field Values
-
SIGNIFICANCE
public static final java.lang.String SIGNIFICANCE
- See Also:
- Constant Field Values
-
STEM
public static final java.lang.String STEM
- See Also:
- Constant Field Values
-
SUBSTRING
public static final java.lang.String SUBSTRING
- See Also:
- Constant Field Values
-
SUFFIX
public static final java.lang.String SUFFIX
- See Also:
- Constant Field Values
-
TARGET_HITS
public static final java.lang.String TARGET_HITS
- See Also:
- Constant Field Values
-
TARGET_NUM_HITS
public static final java.lang.String TARGET_NUM_HITS
- See Also:
- Constant Field Values
-
THRESHOLD_BOOST_FACTOR
public static final java.lang.String THRESHOLD_BOOST_FACTOR
- See Also:
- Constant Field Values
-
UNIQUE_ID
public static final java.lang.String UNIQUE_ID
- See Also:
- Constant Field Values
-
USE_POSITION_DATA
public static final java.lang.String USE_POSITION_DATA
- See Also:
- Constant Field Values
-
WAND
public static final java.lang.String WAND
- See Also:
- Constant Field Values
-
WEAK_AND
public static final java.lang.String WEAK_AND
- See Also:
- Constant Field Values
-
WEIGHTED_SET
public static final java.lang.String WEIGHTED_SET
- See Also:
- Constant Field Values
-
WEIGHT
public static final java.lang.String WEIGHT
- See Also:
- Constant Field Values
-
URI
public static final java.lang.String URI
- 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
-
-