org.apache.solr.search
Class FunctionQParser

java.lang.Object
  extended by org.apache.solr.search.QParser
      extended by org.apache.solr.search.FunctionQParser

public class FunctionQParser
extends QParser


Field Summary
protected  QueryParsing.StrParser sp
           
 
Fields inherited from class org.apache.solr.search.QParser
localParams, params, qstr, query, recurseCount, req
 
Constructor Summary
FunctionQParser(String qstr, SolrParams localParams, SolrParams params, SolrQueryRequest req)
           
 
Method Summary
protected  boolean consumeArgumentDelimiter()
          Consume an argument delimiter (a comma) from the token stream.
 boolean hasMoreArguments()
          Are there more arguments in the argument list being parsed?
 Query parse()
          Create and return the Query object represented by qstr
 String parseArg()
           
 Float parseFloat()
          Parse a float.
 String parseId()
          TODO: Doc
 Query parseNestedQuery()
          TODO: Doc
 ValueSource parseValueSource()
          Parse an individual ValueSource.
protected  ValueSource parseValueSource(boolean doConsumeDelimiter)
          Parse an individual value source.
 List<ValueSource> parseValueSourceList()
          Parse a list of ValueSource.
 
Methods inherited from class org.apache.solr.search.QParser
addDebugInfo, getDefaultHighlightFields, getHighlightQuery, getLocalParams, getParam, getParams, getParser, getQuery, getReq, getSort, getString, setLocalParams, setParams, setReq, setString, subQuery
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sp

protected QueryParsing.StrParser sp
Constructor Detail

FunctionQParser

public FunctionQParser(String qstr,
                       SolrParams localParams,
                       SolrParams params,
                       SolrQueryRequest req)
Method Detail

parse

public Query parse()
            throws ParseException
Description copied from class: QParser
Create and return the Query object represented by qstr

Specified by:
parse in class QParser
Throws:
ParseException
See Also:
QParser.getQuery()

hasMoreArguments

public boolean hasMoreArguments()
                         throws ParseException
Are there more arguments in the argument list being parsed?

Returns:
whether more args exist
Throws:
ParseException

parseId

public String parseId()
               throws ParseException
TODO: Doc

Throws:
ParseException

parseFloat

public Float parseFloat()
                 throws ParseException
Parse a float.

Returns:
Float
Throws:
ParseException

parseArg

public String parseArg()
                throws ParseException
Throws:
ParseException

parseValueSourceList

public List<ValueSource> parseValueSourceList()
                                       throws ParseException
Parse a list of ValueSource. Must be the final set of arguments to a ValueSource.

Returns:
List
Throws:
ParseException

parseValueSource

public ValueSource parseValueSource()
                             throws ParseException
Parse an individual ValueSource.

Throws:
ParseException

parseNestedQuery

public Query parseNestedQuery()
                       throws ParseException
TODO: Doc

Throws:
ParseException

parseValueSource

protected ValueSource parseValueSource(boolean doConsumeDelimiter)
                                throws ParseException
Parse an individual value source.

Parameters:
doConsumeDelimiter - whether to consume a delimiter following the ValueSource
Throws:
ParseException

consumeArgumentDelimiter

protected boolean consumeArgumentDelimiter()
                                    throws ParseException
Consume an argument delimiter (a comma) from the token stream. Only consumes if more arguments should exist (no ending parens or end of string).

Returns:
whether a delimiter was consumed
Throws:
ParseException


Copyright © 2011 Apache Software Foundation. All Rights Reserved.