We use antlr, though without its tree api, it's a bit of overkill.
It directly builds a query in our intermediate format which is
traversed for synonym/phrase detection and converted to lucene query.
The library/language itself is pretty easy to learn, flexible, and has
a nice IDE.
On Fri, Sep 25
We're using Antlr for our query parsing. What I like about it:
- flexibility of separate lexer/parser and tree api
- excellent IDE for building/testing the grammar
However, the learning curve was quite long for me, although this was my
first real encounter with parsers.
Peter
On Fri, Sep 25, 2009
: Any suggestions on what to do then, as the following query exhibits the same
behavior
:
: (+cat) (-dog)
:
: Due to the implied AND. Removing the parenthesis allows it to work. It
: doesn't seem that adding parenthesis in this case should cause the query
: to fail???
Adding parens causes QueryPa
apache.org
Subject: Re: query parsing
On Mittwoch 22 März 2006 18:49, Robert Engels wrote:
> If I use
>
> (+cat) AND (-dog)
>
> it parses to
>
> +(+cat) +(-dog)
>
> and returns no results.
>
> Is this a known issue?
Basically yes. QueryParser is known to exhibit stra
On Mittwoch 22 März 2006 18:49, Robert Engels wrote:
> If I use
>
> (+cat) AND (-dog)
>
> it parses to
>
> +(+cat) +(-dog)
>
> and returns no results.
>
> Is this a known issue?
Basically yes. QueryParser is known to exhibit strange behavior when
combining +/- and AND/OR/NOT.
Regards
Daniel
-