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

Mailing List Archive: Lucene: Java-Dev

[jira] [Updated] (LUCENE-4109) BooleanQueries are not parsed correctly with the flexible query parser

 

 

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


jira at apache

Jul 20, 2012, 3:28 AM

Post #1 of 6 (74 views)
Permalink
[jira] [Updated] (LUCENE-4109) BooleanQueries are not parsed correctly with the flexible query parser

[ https://issues.apache.org/jira/browse/LUCENE-4109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karsten R. updated LUCENE-4109:
-------------------------------

Attachment: LUCENE-4109.patch

Patch for lucene/contrib against http://svn.apache.org/repos/asf/lucene/dev/branches/lucene_solr_3_6
The patch adds the Processor BooleanQuery2ModifierNodeProcessor.
The patch also changes ParametricRangeQueryNodeProcessor as hotfix for LUCENE-3338 (this change is not for 4.X because LUCENE-3338 is already fixed in 4.X).
The patch passes all tests from QueryParserTestBase except
{{{assertQueryEquals("[\\* TO \"*\"]",null,"[\\* TO \\*]");}}}
and LUCENE-2566 related tests.
Patch for trunk will coming soon.

> BooleanQueries are not parsed correctly with the flexible query parser
> ----------------------------------------------------------------------
>
> Key: LUCENE-4109
> URL: https://issues.apache.org/jira/browse/LUCENE-4109
> Project: Lucene - Java
> Issue Type: Bug
> Components: modules/queryparser
> Affects Versions: 3.5, 3.6
> Reporter: Daniel Truemper
> Fix For: 4.0
>
> Attachments: LUCENE-4109.patch, test-patch.txt
>
>
> Hi,
> I just found another bug in the flexible query parser (together with Robert Muir, yay!).
> The following query string works in the standard query parser:
> {noformat}
> (field:[1 TO *] AND field:[* TO 2]) AND field2:z
> {noformat}
> yields
> {noformat}
> +(+field:[1 TO *] +field:[* TO 2]) +field2:z
> {noformat}
> The flexible query parser though yields:
> {noformat}
> +(field:[1 TO *] field:[* TO 2]) +field2:z
> {noformat}
> Test patch is attached (from Robert actually).
> I don't know if it affects earlier versions than 3.5.

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

Jul 20, 2012, 5:37 AM

Post #2 of 6 (73 views)
Permalink
[jira] [Updated] (LUCENE-4109) BooleanQueries are not parsed correctly with the flexible query parser [In reply to]

[ https://issues.apache.org/jira/browse/LUCENE-4109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-4109:
--------------------------------

Attachment: LUCENE-4109.patch

Patch looks good to me!

I also added Daniels test from buzzwords.

Thanks for fixing this, and adding additional tests! Once 3.6 branch is open I'll get it in.

> BooleanQueries are not parsed correctly with the flexible query parser
> ----------------------------------------------------------------------
>
> Key: LUCENE-4109
> URL: https://issues.apache.org/jira/browse/LUCENE-4109
> Project: Lucene - Java
> Issue Type: Bug
> Components: modules/queryparser
> Affects Versions: 3.5, 3.6
> Reporter: Daniel Truemper
> Assignee: Robert Muir
> Fix For: 4.0
>
> Attachments: LUCENE-4109.patch, LUCENE-4109.patch, test-patch.txt
>
>
> Hi,
> I just found another bug in the flexible query parser (together with Robert Muir, yay!).
> The following query string works in the standard query parser:
> {noformat}
> (field:[1 TO *] AND field:[* TO 2]) AND field2:z
> {noformat}
> yields
> {noformat}
> +(+field:[1 TO *] +field:[* TO 2]) +field2:z
> {noformat}
> The flexible query parser though yields:
> {noformat}
> +(field:[1 TO *] field:[* TO 2]) +field2:z
> {noformat}
> Test patch is attached (from Robert actually).
> I don't know if it affects earlier versions than 3.5.

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

Jul 28, 2012, 4:02 PM

Post #3 of 6 (65 views)
Permalink
[jira] [Updated] (LUCENE-4109) BooleanQueries are not parsed correctly with the flexible query parser [In reply to]

[ https://issues.apache.org/jira/browse/LUCENE-4109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karsten R. updated LUCENE-4109:
-------------------------------

Attachment: LUCENE-4109_trunk_rev1366771.patch

Patch against http://svn.apache.org/repos/asf/lucene/dev/trunk (rev1366771)
The patch adds the processor BooleanQuery2ModifierNodeProcessor and a test-class TestStandardQP which extends QueryParserTestBase.
There is also a new interface CommonQueryParserConfiguration to configure flexible and classic parser in QueryParserTestBase.
In TestStandardQP some tests from QueryParserTestBase are hidden by a "do-nothing" overriding method.

The patch passes all tests from /lucene/queryparser/src. It passes because some tests are changed (without changing any meaning). In particular TestMultiFieldQPHelper is changed.

Still "[\\* TO \"*\"]" is parsed as "[\\* TO *]" and not as "[\\* TO \\*]".

If this patch is OK I will provide a Version 3.6.X patch.

> BooleanQueries are not parsed correctly with the flexible query parser
> ----------------------------------------------------------------------
>
> Key: LUCENE-4109
> URL: https://issues.apache.org/jira/browse/LUCENE-4109
> Project: Lucene - Core
> Issue Type: Bug
> Components: modules/queryparser
> Affects Versions: 3.5, 3.6
> Reporter: Daniel Truemper
> Assignee: Robert Muir
> Fix For: 4.0
>
> Attachments: LUCENE-4109.patch, LUCENE-4109.patch, LUCENE-4109_trunk_rev1366771.patch, test-patch.txt
>
>
> Hi,
> I just found another bug in the flexible query parser (together with Robert Muir, yay!).
> The following query string works in the standard query parser:
> {noformat}
> (field:[1 TO *] AND field:[* TO 2]) AND field2:z
> {noformat}
> yields
> {noformat}
> +(+field:[1 TO *] +field:[* TO 2]) +field2:z
> {noformat}
> The flexible query parser though yields:
> {noformat}
> +(field:[1 TO *] field:[* TO 2]) +field2:z
> {noformat}
> Test patch is attached (from Robert actually).
> I don't know if it affects earlier versions than 3.5.

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

Jul 29, 2012, 7:18 AM

Post #4 of 6 (64 views)
Permalink
[jira] [Updated] (LUCENE-4109) BooleanQueries are not parsed correctly with the flexible query parser [In reply to]

[ https://issues.apache.org/jira/browse/LUCENE-4109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-4109:
--------------------------------

Attachment: LUCENE-4109.patch

updated patch. i removed the instanceof and getter from mockanalyzer.

the bug is simply that the flexible queryparser didnt enable position increments by default.

> BooleanQueries are not parsed correctly with the flexible query parser
> ----------------------------------------------------------------------
>
> Key: LUCENE-4109
> URL: https://issues.apache.org/jira/browse/LUCENE-4109
> Project: Lucene - Core
> Issue Type: Bug
> Components: modules/queryparser
> Affects Versions: 3.5, 3.6
> Reporter: Daniel Truemper
> Assignee: Robert Muir
> Fix For: 4.0
>
> Attachments: LUCENE-4109.patch, LUCENE-4109.patch, LUCENE-4109.patch, LUCENE-4109_trunk_rev1366771.patch, test-patch.txt
>
>
> Hi,
> I just found another bug in the flexible query parser (together with Robert Muir, yay!).
> The following query string works in the standard query parser:
> {noformat}
> (field:[1 TO *] AND field:[* TO 2]) AND field2:z
> {noformat}
> yields
> {noformat}
> +(+field:[1 TO *] +field:[* TO 2]) +field2:z
> {noformat}
> The flexible query parser though yields:
> {noformat}
> +(field:[1 TO *] field:[* TO 2]) +field2:z
> {noformat}
> Test patch is attached (from Robert actually).
> I don't know if it affects earlier versions than 3.5.

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

Jul 29, 2012, 7:40 AM

Post #5 of 6 (64 views)
Permalink
[jira] [Updated] (LUCENE-4109) BooleanQueries are not parsed correctly with the flexible query parser [In reply to]

[ https://issues.apache.org/jira/browse/LUCENE-4109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-4109:
--------------------------------

Fix Version/s: 3.6.2
5.0

> BooleanQueries are not parsed correctly with the flexible query parser
> ----------------------------------------------------------------------
>
> Key: LUCENE-4109
> URL: https://issues.apache.org/jira/browse/LUCENE-4109
> Project: Lucene - Core
> Issue Type: Bug
> Components: modules/queryparser
> Affects Versions: 3.5, 3.6
> Reporter: Daniel Truemper
> Assignee: Robert Muir
> Fix For: 4.0, 5.0, 3.6.2
>
> Attachments: LUCENE-4109.patch, LUCENE-4109.patch, LUCENE-4109.patch, LUCENE-4109_trunk_rev1366771.patch, test-patch.txt
>
>
> Hi,
> I just found another bug in the flexible query parser (together with Robert Muir, yay!).
> The following query string works in the standard query parser:
> {noformat}
> (field:[1 TO *] AND field:[* TO 2]) AND field2:z
> {noformat}
> yields
> {noformat}
> +(+field:[1 TO *] +field:[* TO 2]) +field2:z
> {noformat}
> The flexible query parser though yields:
> {noformat}
> +(field:[1 TO *] field:[* TO 2]) +field2:z
> {noformat}
> Test patch is attached (from Robert actually).
> I don't know if it affects earlier versions than 3.5.

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

Jul 30, 2012, 4:41 AM

Post #6 of 6 (63 views)
Permalink
[jira] [Updated] (LUCENE-4109) BooleanQueries are not parsed correctly with the flexible query parser [In reply to]

[ https://issues.apache.org/jira/browse/LUCENE-4109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karsten R. updated LUCENE-4109:
-------------------------------

Attachment: LUCENE-4109_branches_lucene_solr_3_6_rev1367055.patch

Robert, thank you for backporting the patch to 3.6.2
Please also commit this patch with a change of ParametricRangeQueryNodeProcessor because {{[1 TO *]}} is treated like {{[1 TO //*]}} (was not in trunk-patch because of LUCENE-3338)

> BooleanQueries are not parsed correctly with the flexible query parser
> ----------------------------------------------------------------------
>
> Key: LUCENE-4109
> URL: https://issues.apache.org/jira/browse/LUCENE-4109
> Project: Lucene - Core
> Issue Type: Bug
> Components: modules/queryparser
> Affects Versions: 3.5, 3.6
> Reporter: Daniel Truemper
> Assignee: Robert Muir
> Fix For: 4.0, 5.0, 3.6.2
>
> Attachments: LUCENE-4109.patch, LUCENE-4109.patch, LUCENE-4109.patch, LUCENE-4109_branches_lucene_solr_3_6_rev1367055.patch, LUCENE-4109_trunk_rev1366771.patch, test-patch.txt
>
>
> Hi,
> I just found another bug in the flexible query parser (together with Robert Muir, yay!).
> The following query string works in the standard query parser:
> {noformat}
> (field:[1 TO *] AND field:[* TO 2]) AND field2:z
> {noformat}
> yields
> {noformat}
> +(+field:[1 TO *] +field:[* TO 2]) +field2:z
> {noformat}
> The flexible query parser though yields:
> {noformat}
> +(field:[1 TO *] field:[* TO 2]) +field2:z
> {noformat}
> Test patch is attached (from Robert actually).
> I don't know if it affects earlier versions than 3.5.

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

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.