You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "John Wang (JIRA)" <ji...@apache.org> on 2016/12/17 08:42:59 UTC

[jira] [Created] (LUCENE-7597) MultiFieldQueryParser does not honor default operator when there is a special character

John Wang created LUCENE-7597:
---------------------------------

             Summary: MultiFieldQueryParser does not honor default operator when there is a special character
                 Key: LUCENE-7597
                 URL: https://issues.apache.org/jira/browse/LUCENE-7597
             Project: Lucene - Core
          Issue Type: Bug
          Components: core/queryparser
    Affects Versions: 6.3
            Reporter: John Wang


simple code snippet

MultiFieldQueryParser mp = new MultiFieldQueryParser(new String[]{"test"}, new StandardAnalyzer());
    mp.setDefaultOperator(Operator.AND);
    System.out.println(mp.parse(qstring));

if qstring is just 2 tokens, e.g: "you me", behavior is correct:

+(test:you) +(test:me)

now if qstring contains 2 tokens connected by a special char, e.g.: "you&me", behavior is always OR, e.g.

(test:you) (test:me)



--
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