You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael Ryan (JIRA)" <ji...@apache.org> on 2012/05/14 06:51:54 UTC

[jira] [Created] (SOLR-3453) edismax lowercaseOperators=false broken by SOLR-3026

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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (SOLR-3453) edismax lowercaseOperators=false broken by SOLR-3026

Posted by "Tomás Fernández Löbbe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tomás Fernández Löbbe updated SOLR-3453:
----------------------------------------

    Attachment: SOLR-3026.patch

This patch includes the fix and a test case.
                
> 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
>         Attachments: SOLR-3026.patch
>
>
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (SOLR-3453) edismax lowercaseOperators=false broken by SOLR-3026

Posted by "Tomás Fernández Löbbe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tomás Fernández Löbbe updated SOLR-3453:
----------------------------------------

    Attachment: SOLR-3026.patch

Improved the test case a bit. The patch is for trunk.
                
> 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
>         Attachments: SOLR-3026.patch, SOLR-3026.patch
>
>
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Resolved] (SOLR-3453) edismax lowercaseOperators=false broken by SOLR-3026

Posted by "Erick Erickson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Erick Erickson resolved SOLR-3453.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0
                   4.0

Added correctly named patch.
4x fix    r: 1352249
trunk fix r: 1352250
                
> 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
>             Fix For: 4.0, 5.0
>
>         Attachments: SOLR-3026.patch, SOLR-3026.patch, SOLR-3453
>
>
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (SOLR-3453) edismax lowercaseOperators=false broken by SOLR-3026

Posted by "Erick Erickson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Erick Erickson updated SOLR-3453:
---------------------------------

    Attachment: SOLR-3453

Correctly named patch.
                
> 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
>         Attachments: SOLR-3026.patch, SOLR-3026.patch, SOLR-3453
>
>
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (SOLR-3453) edismax lowercaseOperators=false broken by SOLR-3026

Posted by "Erick Erickson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13397712#comment-13397712 ] 

Erick Erickson commented on SOLR-3453:
--------------------------------------

Thanks Tomás!
                
> 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
>             Fix For: 4.0, 5.0
>
>         Attachments: SOLR-3026.patch, SOLR-3026.patch, SOLR-3453
>
>
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org