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?