You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2011/01/25 23:01:50 UTC

[jira] Resolved: (LUCENE-792) PrecedenceQueryParser misinterprets queries starting with NOT

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

Robert Muir resolved LUCENE-792.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0
                   3.1

The precedence queryparser is now fixed for this bug, its implemented with the QP in contrib per LUCENE-1938

I verified with this test case (which I committed):
{noformat}
  // LUCENE-792
  public void testNOT() throws Exception {
    Analyzer a = new MockAnalyzer(MockTokenizer.WHITESPACE, false);
    assertQueryEquals("NOT foo AND bar", a, "-foo +bar");
  }
{noformat}


> PrecedenceQueryParser misinterprets queries starting with NOT
> -------------------------------------------------------------
>
>                 Key: LUCENE-792
>                 URL: https://issues.apache.org/jira/browse/LUCENE-792
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: QueryParser
>    Affects Versions: 2.0.0
>            Reporter: Eric Jain
>             Fix For: 3.1, 4.0
>
>
> "NOT foo AND baz" is parsed as "-(+foo +baz)" instead of "-foo +bar".
> (I'm setting parser.setDefaultOperator(PrecedenceQueryParser.AND_OPERATOR) but the issue applies otherwise too.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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