Package com.google.appengine.api.prospectivesearch.dev

Implementation Notes

See:
          Description

Class Summary
LocalSearchService Local Prospective Search service using in-memory O(n) subscription management.
ProspectiveSearchReservedKinds Exposes constants for reserved datastore kinds used by the local datastore service.
QueryEvaluator The QueryEvaluator class performs a full visit of the query tree, dispatching leaf evaluations to the QueryEngine.
 

Package com.google.appengine.api.prospectivesearch.dev Description

Implementation Notes

Python language diffs

BNF for VanillaQuery.jj

TOKENS

<DEFAULT> SKIP : {
" "
| "\t"
| "\n"
| "\r"
| "\r\n"
}

   
<DEFAULT> TOKEN : {
<DOT: ".">
| <COLON: ":">
| <EQUALS: "=">
| <EQUALSEQUALS: "==">
| <LPAREN: "(">
| <RPAREN: ")">
| <AND: "AND">
| <OR: "OR" | "|">
| <NOT: "-" | "NOT">
| <LESS: "<">
| <GREATER: ">">
| <LESSOREQUALS: "<=" | "=<">
| <GREATEROREQUALS: ">=" | "=>">
| <#DIGIT: ["0"-"9"]>
| <#DIGITS: (<DIGIT>)+>
| <NUMBER: ("-" | "+")? (<DIGITS> (<DOT> <DIGITS>)? | <DOT> <DIGITS>)>
| <ELIPSIS: ".." | "...">
| <NUMBERRANGE: <NUMBER> <ELIPSIS> <NUMBER>>
| <#NOTSPECIAL: ~[":","=","(",")","{","}","|","-","<",">"," ","\""]>
| <TEXT: <NOTSPECIAL> (<NOTSPECIAL> | "-")*>
| <STRING_LITERAL: "\"" (~["\""])* "\"">
}

   

NON-TERMINALS

/**
 * Root production for syntax like (x AND y OR b AND (a b)), terminals
 * handled by QueryTerm().
 */
QueryExpr ::= QueryTerm ( <AND> QueryTerm | <OR> QueryTerm | QueryTerm )* <EOF>
/**
 * Production for query terms, e.g.:
 *
 * -a
 * a:b
 * (a:b -c)
 */
QueryTerm ::= <NOT> QueryTerm
| <TEXT> ( Op QueryValue )?
| <LPAREN> QueryExpr <RPAREN>
/**
 * Production for query operator, e.g. the ":" in:
 *
 *  a:b
 * where ":" may also be: =, ==, <, <=, >, >=.
 */
Op ::= ( <COLON> | <EQUALS> | <EQUALSEQUALS> | <LESS> | <GREATER> | <LESSOREQUALS> | <GREATEROREQUALS> )
/**
 * Production to recognize the query text, which may also be a number
 * range or a nested boolean query just on that field, e.g.:
 *
 *   a:b AND a:c
 *
 * may be:
 *
 *   a:(b AND c)
 */
QueryValue ::= <TEXT>
| <STRING_LITERAL>
| ( <NUMBER> ( <ELIPSIS> <NUMBER> )? )
| <LPAREN> FieldQueryExpr <RPAREN>
/**
 * Production to recognize the inner field query text, otherwise
 * similar to QueryExpr.
 */
FieldQueryExpr ::= FieldTerm ( <AND> FieldTerm | <OR> FieldTerm | FieldTerm )*
/**
 * Production to recognize the inner field terms, otherwise
 * similar to QueryTerm.
 */
FieldTerm ::= <NOT> FieldTerm
| <TEXT>
| <STRING_LITERAL>
| <LPAREN> FieldQueryExpr <RPAREN>