lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dawid Weiss (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LUCENE-6249) StandardQueryParser doesn't support pure negative clauses
Date Mon, 16 Feb 2015 17:11:11 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-6249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dawid Weiss updated LUCENE-6249:
--------------------------------
    Attachment: LUCENE-6249.patch

Here's a modification to the parser that I think handles this.

> StandardQueryParser doesn't support pure negative clauses
> ---------------------------------------------------------
>
>                 Key: LUCENE-6249
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6249
>             Project: Lucene - Core
>          Issue Type: Bug
>    Affects Versions: 4.10.3
>            Reporter: Dawid Weiss
>         Attachments: LUCENE-6249.patch
>
>
> At first I thought it's by design but Uwe says it's a bug. SQP emits this:
> {code}
> StandardQueryParser qp = new StandardQueryParser();
> qp.setDefaultOperator(Operator.AND);
>    
> System.out.println(qp.parse("summary:foo", "deffld"));
> System.out.println(qp.parse("-summary:foo", "deffld"));
> System.out.println(qp.parse("!summary:foo", "deffld"));
> System.out.println(qp.parse("NOT summary:foo", "deffld"));
> {code}
> {code}
> summary:foo
> summary:foo
> summary:foo
> summary:foo
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message