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 Dodsworth (JIRA)" <ji...@apache.org> on 2012/06/27 01:59:42 UTC

[jira] [Created] (SOLR-3580) In ExtendedDismax, lowercase 'not' operator is not being treated as an operator when 'lowercaseOperators' is enabled

Michael Dodsworth created SOLR-3580:
---------------------------------------

             Summary: In ExtendedDismax, lowercase 'not' operator is not being treated as an operator when 'lowercaseOperators' is enabled
                 Key: SOLR-3580
                 URL: https://issues.apache.org/jira/browse/SOLR-3580
             Project: Solr
          Issue Type: Bug
          Components: query parsers
    Affects Versions: 4.0
            Reporter: Michael Dodsworth
            Priority: Minor
             Fix For: 4.0


When lowercase operator support is enabled (for edismax), the lowercase 'not' operator is being wrongly treated as a literal term (and not as an operator).

--
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-3580) In ExtendedDismax, lowercase 'not' operator is not being treated as an operator when 'lowercaseOperators' is enabled

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

Michael Dodsworth updated SOLR-3580:
------------------------------------

    Attachment: SOLR-3580.patch

patch includes:
  - fix to edismax
  - replacement operator test (covers upper and lowercase 'AND', 'OR' and 'NOT' operators with 'lowercaseOperators' enabled/disabled)
  - small clear-up in the test (adding @Test annotations and removing redundant 'throws IOException's)
                
> In ExtendedDismax, lowercase 'not' operator is not being treated as an operator when 'lowercaseOperators' is enabled
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-3580
>                 URL: https://issues.apache.org/jira/browse/SOLR-3580
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 4.0
>            Reporter: Michael Dodsworth
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: SOLR-3580.patch
>
>
> When lowercase operator support is enabled (for edismax), the lowercase 'not' operator is being wrongly treated as a literal term (and not as an operator).

--
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-3580) In ExtendedDismax, lowercase 'not' operator is not being treated as an operator when 'lowercaseOperators' is enabled

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

Yonik Seeley commented on SOLR-3580:
------------------------------------

This is by design.  Treating "and" and "or" as operators when people may not realize they are is much less catastrophic than treating not as an operator.

If someone searches for
to be or not to be
excluding all documents with "to" in them is very bad.


                
> In ExtendedDismax, lowercase 'not' operator is not being treated as an operator when 'lowercaseOperators' is enabled
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-3580
>                 URL: https://issues.apache.org/jira/browse/SOLR-3580
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 4.0
>            Reporter: Michael Dodsworth
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: SOLR-3580.patch
>
>
> When lowercase operator support is enabled (for edismax), the lowercase 'not' operator is being wrongly treated as a literal term (and not as an operator).

--
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-3580) In ExtendedDismax, lowercase 'not' operator is not being treated as an operator when 'lowercaseOperators' is enabled

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

Michael Dodsworth commented on SOLR-3580:
-----------------------------------------

one option (that sits somewhere between the 2 proposed solutions) may be to have a 'supportedLowercaseOperators' setting that takes a comma-separated list of supported operators. If no override is provided, the default behaviour would be to accept '[and,or]'.

{code:xml} 
<str name="supportedLowercaseOperators">and,or,not</str>
{code}

Let me get a patch together so people can take a look.
                
> In ExtendedDismax, lowercase 'not' operator is not being treated as an operator when 'lowercaseOperators' is enabled
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-3580
>                 URL: https://issues.apache.org/jira/browse/SOLR-3580
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 4.0
>            Reporter: Michael Dodsworth
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: SOLR-3580.patch
>
>
> When lowercase operator support is enabled (for edismax), the lowercase 'not' operator is being wrongly treated as a literal term (and not as an operator).

--
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-3580) In ExtendedDismax, lowercase 'not' operator is not being treated as an operator when 'lowercaseOperators' is enabled

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

Yonik Seeley commented on SOLR-3580:
------------------------------------

edismax is about heuristics and sometimes guessing user intent... if exact/strict syntax is desired, the lucene query parser is a better fit.
                
> In ExtendedDismax, lowercase 'not' operator is not being treated as an operator when 'lowercaseOperators' is enabled
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-3580
>                 URL: https://issues.apache.org/jira/browse/SOLR-3580
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 4.0
>            Reporter: Michael Dodsworth
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: SOLR-3580.patch
>
>
> When lowercase operator support is enabled (for edismax), the lowercase 'not' operator is being wrongly treated as a literal term (and not as an operator).

--
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-3580) In ExtendedDismax, lowercase 'not' operator is not being treated as an operator when 'lowercaseOperators' is enabled

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

Michael Dodsworth commented on SOLR-3580:
-----------------------------------------

surely that's a more general hazard with supporting lowercase operators. It seems strange to give 'not' special treatment. There are likely are examples where having 'and' or 'or' wrongly treated as a operator /is/ catastrophic, therefore the onus should be on the client to choose the correct 'lowercaseOperator' option for their use-case.

                
> In ExtendedDismax, lowercase 'not' operator is not being treated as an operator when 'lowercaseOperators' is enabled
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-3580
>                 URL: https://issues.apache.org/jira/browse/SOLR-3580
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 4.0
>            Reporter: Michael Dodsworth
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: SOLR-3580.patch
>
>
> When lowercase operator support is enabled (for edismax), the lowercase 'not' operator is being wrongly treated as a literal term (and not as an operator).

--
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-3580) In ExtendedDismax, lowercase 'not' operator is not being treated as an operator when 'lowercaseOperators' is enabled

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

Michael Dodsworth commented on SOLR-3580:
-----------------------------------------

were we not allowing the user to explicitly *specify* that they want to support lowercase operators, I might agree.

That setting should (at the very least) come with a clear health warning so that more people aren't caught out by this.
                
> In ExtendedDismax, lowercase 'not' operator is not being treated as an operator when 'lowercaseOperators' is enabled
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-3580
>                 URL: https://issues.apache.org/jira/browse/SOLR-3580
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 4.0
>            Reporter: Michael Dodsworth
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: SOLR-3580.patch
>
>
> When lowercase operator support is enabled (for edismax), the lowercase 'not' operator is being wrongly treated as a literal term (and not as an operator).

--
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-3580) In ExtendedDismax, lowercase 'not' operator is not being treated as an operator when 'lowercaseOperators' is enabled

Posted by "Jan Høydahl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13402894#comment-13402894 ] 

Jan Høydahl commented on SOLR-3580:
-----------------------------------

Or redo the whole thing in a more generic way:
{noformat}
validOrOperators=OR,or     (default=OR)
validAndOperators=AND,and  (default=AND)
validNotOperators=NOT      (default=NOT)
{noformat}

This way people cannot only add lowercase variants if wanted, but they can also translate to their own language (Norwegian: ELLER / OG / IKKE) and take more control alltogether; The old lowercaseOperators would be deprecated and removed in next version.
                
> In ExtendedDismax, lowercase 'not' operator is not being treated as an operator when 'lowercaseOperators' is enabled
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-3580
>                 URL: https://issues.apache.org/jira/browse/SOLR-3580
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 4.0
>            Reporter: Michael Dodsworth
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: SOLR-3580.patch
>
>
> When lowercase operator support is enabled (for edismax), the lowercase 'not' operator is being wrongly treated as a literal term (and not as an operator).

--
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-3580) In ExtendedDismax, lowercase 'not' operator is not being treated as an operator when 'lowercaseOperators' is enabled

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

Jack Krupansky commented on SOLR-3580:
--------------------------------------

My recommendation is to have an additional option, "lowercaseNotOperator" which defaults to "false". This would be the safe choice that Yonik recommends, but allow you to override that decision as you see fit for your application.
                
> In ExtendedDismax, lowercase 'not' operator is not being treated as an operator when 'lowercaseOperators' is enabled
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-3580
>                 URL: https://issues.apache.org/jira/browse/SOLR-3580
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 4.0
>            Reporter: Michael Dodsworth
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: SOLR-3580.patch
>
>
> When lowercase operator support is enabled (for edismax), the lowercase 'not' operator is being wrongly treated as a literal term (and not as an operator).

--
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-3580) In ExtendedDismax, lowercase 'not' operator is not being treated as an operator when 'lowercaseOperators' is enabled

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

Hoss Man updated SOLR-3580:
---------------------------

    Fix Version/s:     (was: 4.0)

removing fixVersion=4.0 since there is no evidence that anyone is currently working on this issue.  (this can certainly be revisited if volunteers step forward)

                
> In ExtendedDismax, lowercase 'not' operator is not being treated as an operator when 'lowercaseOperators' is enabled
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-3580
>                 URL: https://issues.apache.org/jira/browse/SOLR-3580
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 4.0-ALPHA
>            Reporter: Michael Dodsworth
>            Priority: Minor
>         Attachments: SOLR-3580.patch, SOLR-3580-proposal.patch
>
>
> When lowercase operator support is enabled (for edismax), the lowercase 'not' operator is being wrongly treated as a literal term (and not as an operator).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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