[Xapian-discuss] Using QueryParser results to populate UI

Peter Karman peter at peknet.com
Sun Jun 6 15:25:24 BST 2010


Matt Goodall wrote on 6/6/10 5:30 AM:

> Incidentally, if anyone has already written a query parser in Python
> that I can use then I'd be extremely grateful! I need to support:
> 
>   * word and phrase terms
>   * AND, implicit, e.g. "one two", and explicit, e.g. "one AND two"
>   * OR
>   * NOT, -expr prefix and/or NOT expr
>   * bracketed expressions
>   * field prefixed searches, e.g. title:"xapian"
> 
> I've actually got something using pyparsing fairly close but I'm
> having trouble making it support implicit AND at the moment.

it's in Perl, but this might help point one way to do it:

http://search.cpan.org/dist/Search-Query/lib/Search/Query/Parser.pm


-- 
Peter Karman  .  http://peknet.com/  .  peter at peknet.com



More information about the Xapian-discuss mailing list