Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-Dev

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

 

 

Lucene java-dev RSS feed   Index | Next | Previous | View Threaded


jira at apache

Apr 18, 2012, 4:48 PM

Post #1 of 7 (186 views)
Permalink
[jira] [Commented] (SOLR-3377) eDismax: A fielded query wrapped by parens is not recognized

[ 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 [at] lucene
For additional commands, e-mail: dev-help [at] lucene


jira at apache

Apr 19, 2012, 12:25 AM

Post #2 of 7 (176 views)
Permalink
[jira] [Commented] (SOLR-3377) eDismax: A fielded query wrapped by parens is not recognized [In reply to]

[ 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 [at] lucene
For additional commands, e-mail: dev-help [at] lucene


jira at apache

Apr 26, 2012, 2:34 PM

Post #3 of 7 (166 views)
Permalink
[jira] [Commented] (SOLR-3377) eDismax: A fielded query wrapped by parens is not recognized [In reply to]

[ 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 [at] lucene
For additional commands, e-mail: dev-help [at] lucene


jira at apache

May 10, 2012, 5:03 AM

Post #4 of 7 (153 views)
Permalink
[jira] [Commented] (SOLR-3377) eDismax: A fielded query wrapped by parens is not recognized [In reply to]

[ 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 [at] lucene
For additional commands, e-mail: dev-help [at] lucene


jira at apache

May 10, 2012, 5:57 AM

Post #5 of 7 (164 views)
Permalink
[jira] [Commented] (SOLR-3377) eDismax: A fielded query wrapped by parens is not recognized [In reply to]

[ 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 [at] lucene
For additional commands, e-mail: dev-help [at] lucene


jira at apache

May 11, 2012, 12:23 AM

Post #6 of 7 (157 views)
Permalink
[jira] [Commented] (SOLR-3377) eDismax: A fielded query wrapped by parens is not recognized [In reply to]

[ 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 [at] lucene
For additional commands, e-mail: dev-help [at] lucene


billnbell at gmail

Jul 4, 2012, 5:41 PM

Post #7 of 7 (126 views)
Permalink
Re: [jira] [Commented] (SOLR-3377) eDismax: A fielded query wrapped by parens is not recognized [In reply to]

Yeah this impacts us too.

Sent from my Mobile device
720-256-8076

On Jul 4, 2012, at 6:38 PM, "Jack Krupansky (JIRA)" <jira [at] apache> wrote:

>
> [ https://issues.apache.org/jira/browse/SOLR-3377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13406796#comment-13406796 ]
>
> Jack Krupansky commented on SOLR-3377:
> --------------------------------------
>
> This seems like a rather serious bug to me, quite a black eye for Solr 3.6. There must be some committer willing to commit the proposed patch.
>
>> 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, 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 [at] lucene
> For additional commands, e-mail: dev-help [at] lucene
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] lucene
For additional commands, e-mail: dev-help [at] lucene

Lucene java-dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.