On Thu, Sep 2, 2010 at 4:18 PM, Mike Taylor <[log in to unmask]> wrote:
> On 2 September 2010 18:12, Tim Williams <[log in to unmask]> wrote:
>> I have this need to support complex boolean queries within a field.
>> I'd like to not have to repeat the 'index relation' over and over
>> within the statement. Rather, I'd like something like
>> title = ((fish OR turtle) AND sea) - though, much more complex -
>> and don't want to have to write:
>> ((title = fish OR title = turtle) AND title = sea)
>> Logically, it's just projecting the index and relation upon the
>> enclosed terms. Before we depart from the CQL spec I thought I'd see
>> if there was a way to get similar 'shortcutting' using build-in
>> extension mechanisms?
> Although the formal specification of CQL stupidly prohibits this
> useful and unambiguous syntax, most or maybe all actual
> implementations support it -- certainly the C/C++ parser in YAZ,
> CQL-Java, the Perl CQL::Parser and thr Ruby gem all do. Have you
> tried just going ahead and doing it? If it's being rejected, what CQL
> parser are you using?
Thanks Mike, I've got a little ANTLR grammar internally that
implements a version of CQL. This lack of index+relation projection
is one of two areas that I've had to stray from the spec so far... the
other is the limited support for proximity.