Michael Ryan created SOLR-3453:
----------------------------------

             Summary: edismax lowercaseOperators=false broken by SOLR-3026
                 Key: SOLR-3453
                 URL: https://issues.apache.org/jira/browse/SOLR-3453
             Project: Solr
          Issue Type: Bug
          Components: search
    Affects Versions: 3.6
            Reporter: Michael Ryan


The edismax lowercaseOperators=false option seems to have been broken by 
SOLR-3026. "foo and bar" and "foo or bar" are treated as "foo AND bar" and "foo 
OR bar", respectively, even when lowercaseOperators=false.

Fix is rather simple, I think (though I haven't tested this). Current code:
{noformat}        if (i>0 && i+1<clauses.size()) {
          if ("AND".equalsIgnoreCase(s)) {
            s="AND";
          } else if ("OR".equalsIgnoreCase(s)) {
            s="OR";
          }
        }{noformat}
Proposed code:
{noformat}        if (lowercaseOperators) {
          if (i>0 && i+1<clauses.size()) {
            if ("AND".equalsIgnoreCase(s)) {
              s="AND";
            } else if ("OR".equalsIgnoreCase(s)) {
              s="OR";
            }
          }
        }{noformat}

Also interesting is the treatment of "Or" and "oR", but I'll leave that as an 
exercise to the reader.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to