Class 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
    • Method Detail

      • parse

        public QueryTree parse​(Parsable query)
        Description copied from interface: Parser
        Parser the given Parsable, and returns a corresponding QueryTree. If parsing fails without an exception, the contained root will be an instance of NullItem.
        Specified by:
        parse in interface Parser
        Parameters:
        query - the Parsable to parse
        Returns:
        the parsed QueryTree, never null
      • 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