You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Jan Høydahl (Created JIRA)" <ji...@apache.org> on 2012/04/19 01:44:40 UTC

[jira] [Created] (SOLR-3377) eDismax: A fielded query wrapped by parens is not recognized

eDismax: A fielded query wrapped by parens is not recognized
------------------------------------------------------------

                 Key: SOLR-3377
                 URL: https://issues.apache.org/jira/browse/SOLR-3377
             Project: Solr
          Issue Type: Bug
          Components: query parsers
    Affects Versions: 3.6
            Reporter: Jan Høydahl
             Fix For: 4.0


As reported by "bernd" on the user list, a query like this

{{q=(name:test)}}

will yield 0 hits in 3.6 while it worked in 3.5. It works without the parens.

--
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-3377) eDismax: A fielded query wrapped by parens is not recognized

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

Jack Krupansky commented on SOLR-3377:
--------------------------------------

Leonhard, your use case seems rather different from that of this Jira.

I presume that you are referring to the generated phrase query boost being a little odd, or maybe that the phrase boost should not occur when the terms are queried against fields not listed in the "pf" parameter. Feel free to raise that as a separate issue.

You refer to "splitting", but I don't see any term splitting in this example.

                
> eDismax: A fielded query wrapped by parens is not recognized
> ------------------------------------------------------------
>
>                 Key: SOLR-3377
>                 URL: https://issues.apache.org/jira/browse/SOLR-3377
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 3.6
>            Reporter: Jan Høydahl
>            Assignee: Yonik Seeley
>            Priority: Critical
>             Fix For: 4.0-BETA
>
>         Attachments: SOLR-3377.patch, SOLR-3377.patch, SOLR-3377.patch, SOLR-3377.patch
>
>
> As reported by "bernd" on the user list, a query like this
> {{q=(name:test)}}
> will yield 0 hits in 3.6 while it worked in 3.5. It works without the parens.

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


[jira] [Commented] (SOLR-3377) eDismax: A fielded query wrapped by parens is not recognized

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

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

Tried the patch, it fails one of the existing tests for me @ TestExtendedDismaxParser.java:164, the query is
{{star OR (-star)}}
Does this test pass for you?
                
> eDismax: A fielded query wrapped by parens is not recognized
> ------------------------------------------------------------
>
>                 Key: SOLR-3377
>                 URL: https://issues.apache.org/jira/browse/SOLR-3377
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 3.6
>            Reporter: Jan Høydahl
>            Assignee: Bernd Fehling
>             Fix For: 4.0, 3.6.1
>
>         Attachments: SOLR-3377.patch, SOLR-3377.patch
>
>
> As reported by "bernd" on the user list, a query like this
> {{q=(name:test)}}
> will yield 0 hits in 3.6 while it worked in 3.5. It works without the parens.

--
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-3377) eDismax: A fielded query wrapped by parens is not recognized

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

Jan Høydahl updated SOLR-3377:
------------------------------

    Attachment: SOLR-3377.patch

This first patch only reproduces the bug with a failing unit test
                
> eDismax: A fielded query wrapped by parens is not recognized
> ------------------------------------------------------------
>
>                 Key: SOLR-3377
>                 URL: https://issues.apache.org/jira/browse/SOLR-3377
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 3.6
>            Reporter: Jan Høydahl
>             Fix For: 4.0
>
>         Attachments: SOLR-3377.patch
>
>
> As reported by "bernd" on the user list, a query like this
> {{q=(name:test)}}
> will yield 0 hits in 3.6 while it worked in 3.5. It works without the parens.

--
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] [Comment Edited] (SOLR-3377) eDismax: A fielded query wrapped by parens is not recognized

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

Shawn Heisey edited comment on SOLR-3377 at 10/10/12 6:51 AM:
--------------------------------------------------------------

I confirmed (using the solr example) that 4.0-BETA and lucene_solr_4_0 can parse a query similar to my test query perfectly.  Query URL created by filling out the admin query interface:

http://server:8983/solr/collection1/select?q=((cat%3Astring1)+OR+(cat%3Astring2)+OR+(cat%3Astring3)+(Kitchen+Sink))&wt=xml&debugQuery=true&defType=edismax&qf=text&pf=text%5E2

                
      was (Author: elyograg):
    I confirmed (using the solr example) that 4.0-BETA and lucene_solr_4_0 can parse a query similar to my test query perfectly.  Query URL created by filling out the admin query interface:

http://server:8983/solr/collection1/select?q=((cat%3Astring1)+OR+(cat%3Astring2)+OR+(cat%3Astring3)+(Kitchen+Sink))&wt=xml&debugQuery=true&defType=edismax&qf=text&pf=text%5E2

Just for completeness, I also tried it in the lucene_solr_3_6 example.  It behaves just like 3.5.0 does, including working when the spaces are added.

Solr Implementation Version: 3.6.2-SNAPSHOT 1396476 - root - 2012-10-09 23:48:08

I will file a separate bug on 3.6.1 related to this one.

                  
> eDismax: A fielded query wrapped by parens is not recognized
> ------------------------------------------------------------
>
>                 Key: SOLR-3377
>                 URL: https://issues.apache.org/jira/browse/SOLR-3377
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 3.6
>            Reporter: Jan Høydahl
>            Assignee: Yonik Seeley
>            Priority: Critical
>             Fix For: 4.0-BETA
>
>         Attachments: SOLR-3377.patch, SOLR-3377.patch, SOLR-3377.patch, SOLR-3377.patch
>
>
> As reported by "bernd" on the user list, a query like this
> {{q=(name:test)}}
> will yield 0 hits in 3.6 while it worked in 3.5. It works without the parens.

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


[jira] [Updated] (SOLR-3377) eDismax: A fielded query wrapped by parens is not recognized

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

Bernd Fehling updated SOLR-3377:
--------------------------------

    Attachment: SOLR-3377.patch

You're right.
New patch is doing the job now but I'm not very happy with it.

The patch should be a more general solution but this is currently a specific solution.

At least it does not change the original query as a replacement from "(" to "( + space" would do.

                
> eDismax: A fielded query wrapped by parens is not recognized
> ------------------------------------------------------------
>
>                 Key: SOLR-3377
>                 URL: https://issues.apache.org/jira/browse/SOLR-3377
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 3.6
>            Reporter: Jan Høydahl
>            Assignee: Bernd Fehling
>             Fix For: 4.0, 3.6.1
>
>         Attachments: SOLR-3377.patch, SOLR-3377.patch, SOLR-3377.patch
>
>
> As reported by "bernd" on the user list, a query like this
> {{q=(name:test)}}
> will yield 0 hits in 3.6 while it worked in 3.5. It works without the parens.

--
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-3377) eDismax: A fielded query wrapped by parens is not recognized

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

Shawn Heisey commented on SOLR-3377:
------------------------------------

I have come across something similar to this in Solr 3.5.0.  I am wondering if this problem is fixed by this issue in the upcoming 4.0.  I don't have a 4.0 index at the moment that I can test on.

query:
{code}((feature:depphotos) OR (feature:glowimages) OR (feature:ipurestockx)  (Kitchen))
{code}

handler definition:
{code}
    <str name="defType">edismax</str>
    <str name="echoParams">all</str>
    <int name="rows">70</int>
    <str name="shards">idxa2.REDACTED.com:8981/solr/inclive,idxa1.REDACTED.com:8981/solr/s0live,idxa1.REDACTED.com:8981/solr/s1live,idxa1.REDACTED.com:8981/solr/s2live,idxa2.REDACTED.com:8981/solr/s3live,idxa2.REDACTED.com:8981/solr/s4live,idxa2.REDACTED.com:8981/solr/s5live</str>
    <float name="tie">0.1</float>
    <int name="qs">3</int>
    <int name="ps">3</int>
    <str name="qf">catchall</str>
    <str name="pf">catchall^2</str>
    <str name="boost">
      recip(ms(NOW/DAY,pd),3.16e-11,1,1)
    </str>
    <str name="fl">score,*</str>
    <str name="mm">100%</str>
    <str name="q.alt">*:*</str>
    <bool name="lowercaseOperators">false</bool>
{code}

parsedquery_toString:
{code}
boost(+(feature:depphotos feature:glowimages feature:ipurestockx (catchall:kitchen)~0.1) (catchall:"(feature:depphotos feature) depphotos (feature:glowimages feature) glowimages (feature:ipurestockx feature) ipurestockx kitchen"~3^2.0)~0.1,1.0/(3.16E-11*float(ms(const(1349654400000),date(pd)))+1.0))
{code}

Adding some spaces fixes it:
{code}(( feature:depphotos ) OR ( feature:glowimages ) OR ( feature:ipurestockx )  (Kitchen))
{code}

becomes:

{code}boost(+(feature:depphotos feature:glowimages feature:ipurestockx (catchall:kitchen)~0.1) (),1.0/(3.16E-11*float(ms(const(1349654400000),date(pd)))+1.0))
{code}

It also suffers from the problem where the default operator (AND in our case) is ignored, but I believe that issue is already filed.

                
> eDismax: A fielded query wrapped by parens is not recognized
> ------------------------------------------------------------
>
>                 Key: SOLR-3377
>                 URL: https://issues.apache.org/jira/browse/SOLR-3377
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 3.6
>            Reporter: Jan Høydahl
>            Assignee: Yonik Seeley
>            Priority: Critical
>             Fix For: 4.0-BETA
>
>         Attachments: SOLR-3377.patch, SOLR-3377.patch, SOLR-3377.patch, SOLR-3377.patch
>
>
> As reported by "bernd" on the user list, a query like this
> {{q=(name:test)}}
> will yield 0 hits in 3.6 while it worked in 3.5. It works without the parens.

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


[jira] [Updated] (SOLR-3377) eDismax: A fielded query wrapped by parens is not recognized

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

Bernd Fehling updated SOLR-3377:
--------------------------------

    Attachment: SOLR-3377.patch

Now this is a general patch which passes all tests.
It can handle one or more parentheses directly before a valid field name.

Please test and give feedback.

                
> eDismax: A fielded query wrapped by parens is not recognized
> ------------------------------------------------------------
>
>                 Key: SOLR-3377
>                 URL: https://issues.apache.org/jira/browse/SOLR-3377
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 3.6
>            Reporter: Jan Høydahl
>            Assignee: Bernd Fehling
>             Fix For: 4.0, 3.6.1
>
>         Attachments: SOLR-3377.patch, SOLR-3377.patch, SOLR-3377.patch, SOLR-3377.patch
>
>
> As reported by "bernd" on the user list, a query like this
> {{q=(name:test)}}
> will yield 0 hits in 3.6 while it worked in 3.5. It works without the parens.

--
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-3377) eDismax: A fielded query wrapped by parens is not recognized

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

Jan Høydahl updated SOLR-3377:
------------------------------

    Fix Version/s: 3.6.1
    
> eDismax: A fielded query wrapped by parens is not recognized
> ------------------------------------------------------------
>
>                 Key: SOLR-3377
>                 URL: https://issues.apache.org/jira/browse/SOLR-3377
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 3.6
>            Reporter: Jan Høydahl
>             Fix For: 4.0, 3.6.1
>
>         Attachments: SOLR-3377.patch
>
>
> As reported by "bernd" on the user list, a query like this
> {{q=(name:test)}}
> will yield 0 hits in 3.6 while it worked in 3.5. It works without the parens.

--
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-3377) eDismax: A fielded query wrapped by parens is not recognized

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

Bernd Fehling updated SOLR-3377:
--------------------------------

    Attachment: SOLR-3377.patch

I have enhanced the test a bit more and supplied a patch which works.
It also passes all other tests.

Please test and give feedback.

                
> eDismax: A fielded query wrapped by parens is not recognized
> ------------------------------------------------------------
>
>                 Key: SOLR-3377
>                 URL: https://issues.apache.org/jira/browse/SOLR-3377
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 3.6
>            Reporter: Jan Høydahl
>            Assignee: Bernd Fehling
>             Fix For: 4.0, 3.6.1
>
>         Attachments: SOLR-3377.patch, SOLR-3377.patch
>
>
> As reported by "bernd" on the user list, a query like this
> {{q=(name:test)}}
> will yield 0 hits in 3.6 while it worked in 3.5. It works without the parens.

--
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] [Assigned] (SOLR-3377) eDismax: A fielded query wrapped by parens is not recognized

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

Bernd Fehling reassigned SOLR-3377:
-----------------------------------

    Assignee: Bernd Fehling
    
> eDismax: A fielded query wrapped by parens is not recognized
> ------------------------------------------------------------
>
>                 Key: SOLR-3377
>                 URL: https://issues.apache.org/jira/browse/SOLR-3377
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 3.6
>            Reporter: Jan Høydahl
>            Assignee: Bernd Fehling
>             Fix For: 4.0, 3.6.1
>
>         Attachments: SOLR-3377.patch
>
>
> As reported by "bernd" on the user list, a query like this
> {{q=(name:test)}}
> will yield 0 hits in 3.6 while it worked in 3.5. It works without the parens.

--
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-3377) eDismax: A fielded query wrapped by parens is not recognized

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

Bernd Fehling commented on SOLR-3377:
-------------------------------------

Shoot me an enhanced unit test which covers your requests and i will look into this.

But, while looking through all the test cases I think we really need a clear definition of rules and define a BNF syntax description for edismax and then implement the BNF syntax. This has two advantages, the user knows how to construct a valid query and we can clean up the patch work inside edismax. This can also obey fallback mechanism to always return a valid query.
How about that?

                
> eDismax: A fielded query wrapped by parens is not recognized
> ------------------------------------------------------------
>
>                 Key: SOLR-3377
>                 URL: https://issues.apache.org/jira/browse/SOLR-3377
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 3.6
>            Reporter: Jan Høydahl
>            Assignee: Bernd Fehling
>             Fix For: 4.0, 3.6.1
>
>         Attachments: SOLR-3377.patch, SOLR-3377.patch, SOLR-3377.patch, SOLR-3377.patch
>
>
> As reported by "bernd" on the user list, a query like this
> {{q=(name:test)}}
> will yield 0 hits in 3.6 while it worked in 3.5. It works without the parens.

--
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-3377) eDismax: A fielded query wrapped by parens is not recognized

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

Jack Krupansky commented on SOLR-3377:
--------------------------------------

Yes, it looks like a bug, but distinct from this current Jira. Actually, two bugs:

1. Fielded terms should not be used in phrase boost except for the specified field.
2. Some terms appear to have been skipped for phrase boost.

                
> eDismax: A fielded query wrapped by parens is not recognized
> ------------------------------------------------------------
>
>                 Key: SOLR-3377
>                 URL: https://issues.apache.org/jira/browse/SOLR-3377
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 3.6
>            Reporter: Jan Høydahl
>            Assignee: Yonik Seeley
>            Priority: Critical
>             Fix For: 4.0-BETA
>
>         Attachments: SOLR-3377.patch, SOLR-3377.patch, SOLR-3377.patch, SOLR-3377.patch
>
>
> As reported by "bernd" on the user list, a query like this
> {{q=(name:test)}}
> will yield 0 hits in 3.6 while it worked in 3.5. It works without the parens.

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


[jira] [Commented] (SOLR-3377) eDismax: A fielded query wrapped by parens is not recognized

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

Shawn Heisey commented on SOLR-3377:
------------------------------------

I confirmed (using the solr example) that 4.0-BETA and lucene_solr_4_0 can parse a query similar to my test query perfectly.  Query URL created by filling out the admin query interface:

http://server:8983/solr/collection1/select?q=((cat%3Astring1)+OR+(cat%3Astring2)+OR+(cat%3Astring3)+(Kitchen+Sink))&wt=xml&debugQuery=true&defType=edismax&qf=text&pf=text%5E2

Just for completeness, I also tried it in the lucene_solr_3_6 example.  It behaves just like 3.5.0 does, including working when the spaces are added.

Solr Implementation Version: 3.6.2-SNAPSHOT 1396476 - root - 2012-10-09 23:48:08

I will file a separate bug on 3.6.1 related to this one.

                
> eDismax: A fielded query wrapped by parens is not recognized
> ------------------------------------------------------------
>
>                 Key: SOLR-3377
>                 URL: https://issues.apache.org/jira/browse/SOLR-3377
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 3.6
>            Reporter: Jan Høydahl
>            Assignee: Yonik Seeley
>            Priority: Critical
>             Fix For: 4.0-BETA
>
>         Attachments: SOLR-3377.patch, SOLR-3377.patch, SOLR-3377.patch, SOLR-3377.patch
>
>
> As reported by "bernd" on the user list, a query like this
> {{q=(name:test)}}
> will yield 0 hits in 3.6 while it worked in 3.5. It works without the parens.

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


[jira] [Commented] (SOLR-3377) eDismax: A fielded query wrapped by parens is not recognized

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

Bernd Fehling commented on SOLR-3377:
-------------------------------------

If there are no further complains about the patch can it then be committed to 3.6.1 / trunk and the issue closed?

Who is doing the commit / has the permissions to commit?

                
> eDismax: A fielded query wrapped by parens is not recognized
> ------------------------------------------------------------
>
>                 Key: SOLR-3377
>                 URL: https://issues.apache.org/jira/browse/SOLR-3377
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 3.6
>            Reporter: Jan Høydahl
>            Assignee: Bernd Fehling
>             Fix For: 4.0, 3.6.1
>
>         Attachments: SOLR-3377.patch, SOLR-3377.patch, SOLR-3377.patch, SOLR-3377.patch
>
>
> As reported by "bernd" on the user list, a query like this
> {{q=(name:test)}}
> will yield 0 hits in 3.6 while it worked in 3.5. It works without the parens.

--
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-3377) eDismax: A fielded query wrapped by parens is not recognized

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

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

I think we need better test coverage before this is ready.
We should add a bunch of tests with queries involving parens, to verify that they behave as expected. Both tests involving parens as intended grouping for boolean precedence as well as parens not intended as boolean sugar but as plain text pasted from somewhere:

{noformat}
q=(foo OR title:bar) AND (title:foo OR bar)
q=Meeting at noon (room:Auditorium)
{noformat}

The first should obey the instructed boolean order, while the last should return docs with the literal token "room:Autirium" in any of the qf fields.

The key goal of dismax is to be very robust so people can paste in all kind of garbage, and get matches. So if the query parses as valid boolean logic, that should be used.
                
> eDismax: A fielded query wrapped by parens is not recognized
> ------------------------------------------------------------
>
>                 Key: SOLR-3377
>                 URL: https://issues.apache.org/jira/browse/SOLR-3377
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 3.6
>            Reporter: Jan Høydahl
>            Assignee: Bernd Fehling
>             Fix For: 4.0, 3.6.1
>
>         Attachments: SOLR-3377.patch, SOLR-3377.patch, SOLR-3377.patch, SOLR-3377.patch
>
>
> As reported by "bernd" on the user list, a query like this
> {{q=(name:test)}}
> will yield 0 hits in 3.6 while it worked in 3.5. It works without the parens.

--
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-3377) eDismax: A fielded query wrapped by parens is not recognized

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

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

The query is parsed into:

{{+(id:name:test^10.0 | text:name:test^0.5 | cat:name:test^1.4 | manu:name:test^1.1 | name:name:test^1.2 | features:name:test | sku:nametest^1.5)}}

suggesting that eDismax falls back to literal matching because the field name (name is not found. Perhaps introduced by SOLR-3026?

A temporary workaround seems to be to insert a space before all field names:

q={{( name:test )}}
                
> eDismax: A fielded query wrapped by parens is not recognized
> ------------------------------------------------------------
>
>                 Key: SOLR-3377
>                 URL: https://issues.apache.org/jira/browse/SOLR-3377
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 3.6
>            Reporter: Jan Høydahl
>             Fix For: 4.0
>
>
> As reported by "bernd" on the user list, a query like this
> {{q=(name:test)}}
> will yield 0 hits in 3.6 while it worked in 3.5. It works without the parens.

--
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-3377) eDismax: A fielded query wrapped by parens is not recognized

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

Bernd Fehling commented on SOLR-3377:
-------------------------------------

A suggestion, how would it be to do a simple "cleanup" as a first step of query string handling by removing the outermost parantheses (if there are any)?
This won't touch the inner edismax logic and produce another bad sideeffect.

                
> eDismax: A fielded query wrapped by parens is not recognized
> ------------------------------------------------------------
>
>                 Key: SOLR-3377
>                 URL: https://issues.apache.org/jira/browse/SOLR-3377
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 3.6
>            Reporter: Jan Høydahl
>             Fix For: 4.0
>
>         Attachments: SOLR-3377.patch
>
>
> As reported by "bernd" on the user list, a query like this
> {{q=(name:test)}}
> will yield 0 hits in 3.6 while it worked in 3.5. It works without the parens.

--
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-3377) eDismax: A fielded query wrapped by parens is not recognized

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

Leonhard Maylein commented on SOLR-3377:
----------------------------------------

Ok, I understand.
The phrase boost queries are separated from the normal query expansion via the qf paramter.

But, all terms are (equally) qualified by a field (field sw for the terms a and b, field ti for the terms c and d).
Why do the eDismax handler only use the terms b and d to build the phrase boost query?
Isn't it a bug?


                
> eDismax: A fielded query wrapped by parens is not recognized
> ------------------------------------------------------------
>
>                 Key: SOLR-3377
>                 URL: https://issues.apache.org/jira/browse/SOLR-3377
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 3.6
>            Reporter: Jan Høydahl
>            Assignee: Yonik Seeley
>            Priority: Critical
>             Fix For: 4.0-BETA
>
>         Attachments: SOLR-3377.patch, SOLR-3377.patch, SOLR-3377.patch, SOLR-3377.patch
>
>
> As reported by "bernd" on the user list, a query like this
> {{q=(name:test)}}
> will yield 0 hits in 3.6 while it worked in 3.5. It works without the parens.

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


[jira] [Commented] (SOLR-3377) eDismax: A fielded query wrapped by parens is not recognized

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

Leonhard Maylein commented on SOLR-3377:
----------------------------------------

I do not agree that this issue is solved.

I've tried the following combination with SOLR 4.0.0

q: +sw(a b) +ti:(c d)
qf: freitext exttext^0.5
pf: freitext^6 exttext^3

The result is:

<str name="rawquerystring">+sw:(a b) +ti:(c d)</str>

<str name="querystring">+sw:(a b) +ti:(c d)</str>

<str name="parsedquery">(+(+(sw:a sw:b) +(ti:c ti:d)) DisjunctionMaxQuery((freitext:"b d"^6.0)) DisjunctionMaxQuery((exttext:"b d"^3.0)))/no_coord</str>

There should be no splitting on the qf/pf fields and therefore no DisjunctionMaxQueries.

The query '+(sw:a sw:b) +(ti:c ti:d)' works as expected.
                
> eDismax: A fielded query wrapped by parens is not recognized
> ------------------------------------------------------------
>
>                 Key: SOLR-3377
>                 URL: https://issues.apache.org/jira/browse/SOLR-3377
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 3.6
>            Reporter: Jan Høydahl
>            Assignee: Yonik Seeley
>            Priority: Critical
>             Fix For: 4.0-BETA
>
>         Attachments: SOLR-3377.patch, SOLR-3377.patch, SOLR-3377.patch, SOLR-3377.patch
>
>
> As reported by "bernd" on the user list, a query like this
> {{q=(name:test)}}
> will yield 0 hits in 3.6 while it worked in 3.5. It works without the parens.

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


[jira] [Commented] (SOLR-3377) eDismax: A fielded query wrapped by parens is not recognized

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

Shawn Heisey commented on SOLR-3377:
------------------------------------

I have the relevant pieces of schema.xml ready to include, but I will wait until I know whether this is the appropriate issue, or a new issue should be filed.

                
> eDismax: A fielded query wrapped by parens is not recognized
> ------------------------------------------------------------
>
>                 Key: SOLR-3377
>                 URL: https://issues.apache.org/jira/browse/SOLR-3377
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 3.6
>            Reporter: Jan Høydahl
>            Assignee: Yonik Seeley
>            Priority: Critical
>             Fix For: 4.0-BETA
>
>         Attachments: SOLR-3377.patch, SOLR-3377.patch, SOLR-3377.patch, SOLR-3377.patch
>
>
> As reported by "bernd" on the user list, a query like this
> {{q=(name:test)}}
> will yield 0 hits in 3.6 while it worked in 3.5. It works without the parens.

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