You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2007/02/23 07:01:05 UTC
[jira] Created: (LUCENE-813) leading wildcard's don't work with
trailing wildcard
leading wildcard's don't work with trailing wildcard
----------------------------------------------------
Key: LUCENE-813
URL: https://issues.apache.org/jira/browse/LUCENE-813
Project: Lucene - Java
Issue Type: Bug
Reporter: Hoss Man
Attachments: qp-leading-wildcard.patch
As reported by Antony Bowesman, leading wildcards don't work when there is a trailing wildcard character -- instead a PrefixQuery is constructed.
http://www.nabble.com/QueryParser-bug--tf3270956.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-813) leading wildcard's don't work with
trailing wildcard
Posted by "Michael Busch (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475573 ]
Michael Busch commented on LUCENE-813:
--------------------------------------
> Another tehnical issue that came up is line endings - compiling on XP, using cygwin, the javacc result files had wrong line endings.
I have the same problem. I'm compiling on Win XP too, using eclipse and the javacc plugin. That used to work fine for me, but now it doesn't anymore, the result files have inconsistent line endings.
> leading wildcard's don't work with trailing wildcard
> ----------------------------------------------------
>
> Key: LUCENE-813
> URL: https://issues.apache.org/jira/browse/LUCENE-813
> Project: Lucene - Java
> Issue Type: Bug
> Reporter: Hoss Man
> Assigned To: Doron Cohen
> Attachments: qp-leading-wildcard.patch
>
>
> As reported by Antony Bowesman, leading wildcards don't work when there is a trailing wildcard character -- instead a PrefixQuery is constructed.
> http://www.nabble.com/QueryParser-bug--tf3270956.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Updated: (LUCENE-813) leading wildcard's don't work with
trailing wildcard
Posted by "Doron Cohen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-813?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Doron Cohen updated LUCENE-813:
-------------------------------
Attachment: (was: 813.fix.lead.wildcard.patch)
> leading wildcard's don't work with trailing wildcard
> ----------------------------------------------------
>
> Key: LUCENE-813
> URL: https://issues.apache.org/jira/browse/LUCENE-813
> Project: Lucene - Java
> Issue Type: Bug
> Reporter: Hoss Man
> Assigned To: Doron Cohen
> Attachments: 813.fix.lead.wildcard.patch, qp-leading-wildcard.patch
>
>
> As reported by Antony Bowesman, leading wildcards don't work when there is a trailing wildcard character -- instead a PrefixQuery is constructed.
> http://www.nabble.com/QueryParser-bug--tf3270956.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Updated: (LUCENE-813) leading wildcard's don't work with
trailing wildcard
Posted by "Doron Cohen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-813?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Doron Cohen updated LUCENE-813:
-------------------------------
Attachment: 813.fix.lead.wildcard.patch
Reattaching (forgot to grant the license in the first shot...)
> leading wildcard's don't work with trailing wildcard
> ----------------------------------------------------
>
> Key: LUCENE-813
> URL: https://issues.apache.org/jira/browse/LUCENE-813
> Project: Lucene - Java
> Issue Type: Bug
> Reporter: Hoss Man
> Assigned To: Doron Cohen
> Attachments: 813.fix.lead.wildcard.patch, qp-leading-wildcard.patch
>
>
> As reported by Antony Bowesman, leading wildcards don't work when there is a trailing wildcard character -- instead a PrefixQuery is constructed.
> http://www.nabble.com/QueryParser-bug--tf3270956.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-813) leading wildcard's don't work with
trailing wildcard
Posted by "Doron Cohen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475963 ]
Doron Cohen commented on LUCENE-813:
------------------------------------
Now working for Antony -
http://www.nabble.com/forum/ViewPost.jtp?post=9094319&framed=y
I will commit this if there are no other comments.
Doron
> leading wildcard's don't work with trailing wildcard
> ----------------------------------------------------
>
> Key: LUCENE-813
> URL: https://issues.apache.org/jira/browse/LUCENE-813
> Project: Lucene - Java
> Issue Type: Bug
> Reporter: Hoss Man
> Assigned To: Doron Cohen
> Attachments: 813.fix.lead.wildcard.patch, qp-leading-wildcard.patch
>
>
> As reported by Antony Bowesman, leading wildcards don't work when there is a trailing wildcard character -- instead a PrefixQuery is constructed.
> http://www.nabble.com/QueryParser-bug--tf3270956.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Resolved: (LUCENE-813) leading wildcard's don't work with
trailing wildcard
Posted by "Doron Cohen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-813?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Doron Cohen resolved LUCENE-813.
--------------------------------
Resolution: Fixed
Fix Version/s: 2.2
Lucene Fields: [Patch Available] (was: [Patch Available, New])
Thanks for reviewing this Michael!
Commited, with few additional wildcard queries in TestWildcard..testParsingAndSearching().
> leading wildcard's don't work with trailing wildcard
> ----------------------------------------------------
>
> Key: LUCENE-813
> URL: https://issues.apache.org/jira/browse/LUCENE-813
> Project: Lucene - Java
> Issue Type: Bug
> Reporter: Hoss Man
> Assigned To: Doron Cohen
> Fix For: 2.2
>
> Attachments: 813.fix.lead.wildcard.patch, qp-leading-wildcard.patch
>
>
> As reported by Antony Bowesman, leading wildcards don't work when there is a trailing wildcard character -- instead a PrefixQuery is constructed.
> http://www.nabble.com/QueryParser-bug--tf3270956.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Assigned: (LUCENE-813) leading wildcard's don't work with
trailing wildcard
Posted by "Doron Cohen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-813?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Doron Cohen reassigned LUCENE-813:
----------------------------------
Assignee: Doron Cohen
> leading wildcard's don't work with trailing wildcard
> ----------------------------------------------------
>
> Key: LUCENE-813
> URL: https://issues.apache.org/jira/browse/LUCENE-813
> Project: Lucene - Java
> Issue Type: Bug
> Reporter: Hoss Man
> Assigned To: Doron Cohen
> Attachments: qp-leading-wildcard.patch
>
>
> As reported by Antony Bowesman, leading wildcards don't work when there is a trailing wildcard character -- instead a PrefixQuery is constructed.
> http://www.nabble.com/QueryParser-bug--tf3270956.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-813) leading wildcard's don't work with
trailing wildcard
Posted by "Doron Cohen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475599 ]
Doron Cohen commented on LUCENE-813:
------------------------------------
I added a fix for this in build.xml -
http://issues.apache.org/jira/browse/LUCENE-814
(only for the QueryParser for now.)
Could you try it?
Thanks,
Doron
> leading wildcard's don't work with trailing wildcard
> ----------------------------------------------------
>
> Key: LUCENE-813
> URL: https://issues.apache.org/jira/browse/LUCENE-813
> Project: Lucene - Java
> Issue Type: Bug
> Reporter: Hoss Man
> Assigned To: Doron Cohen
> Attachments: 813.fix.lead.wildcard.patch, qp-leading-wildcard.patch
>
>
> As reported by Antony Bowesman, leading wildcards don't work when there is a trailing wildcard character -- instead a PrefixQuery is constructed.
> http://www.nabble.com/QueryParser-bug--tf3270956.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Updated: (LUCENE-813) leading wildcard's don't work with
trailing wildcard
Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-813?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hoss Man updated LUCENE-813:
----------------------------
Attachment: qp-leading-wildcard.patch
patch demonstrating problem in testcase
> leading wildcard's don't work with trailing wildcard
> ----------------------------------------------------
>
> Key: LUCENE-813
> URL: https://issues.apache.org/jira/browse/LUCENE-813
> Project: Lucene - Java
> Issue Type: Bug
> Reporter: Hoss Man
> Attachments: qp-leading-wildcard.patch
>
>
> As reported by Antony Bowesman, leading wildcards don't work when there is a trailing wildcard character -- instead a PrefixQuery is constructed.
> http://www.nabble.com/QueryParser-bug--tf3270956.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-813) leading wildcard's don't work with
trailing wildcard
Posted by "Michael Busch (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12476055 ]
Michael Busch commented on LUCENE-813:
--------------------------------------
I tried it out, Doron. It works fine and all tests pass. I like the new tests in TestWildcard.
> leading wildcard's don't work with trailing wildcard
> ----------------------------------------------------
>
> Key: LUCENE-813
> URL: https://issues.apache.org/jira/browse/LUCENE-813
> Project: Lucene - Java
> Issue Type: Bug
> Reporter: Hoss Man
> Assigned To: Doron Cohen
> Attachments: 813.fix.lead.wildcard.patch, qp-leading-wildcard.patch
>
>
> As reported by Antony Bowesman, leading wildcards don't work when there is a trailing wildcard character -- instead a PrefixQuery is constructed.
> http://www.nabble.com/QueryParser-bug--tf3270956.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Updated: (LUCENE-813) leading wildcard's don't work with
trailing wildcard
Posted by "Doron Cohen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-813?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Doron Cohen updated LUCENE-813:
-------------------------------
Lucene Fields: [New, Patch Available] (was: [New])
> leading wildcard's don't work with trailing wildcard
> ----------------------------------------------------
>
> Key: LUCENE-813
> URL: https://issues.apache.org/jira/browse/LUCENE-813
> Project: Lucene - Java
> Issue Type: Bug
> Reporter: Hoss Man
> Assigned To: Doron Cohen
> Attachments: 813.fix.lead.wildcard.patch, qp-leading-wildcard.patch
>
>
> As reported by Antony Bowesman, leading wildcards don't work when there is a trailing wildcard character -- instead a PrefixQuery is constructed.
> http://www.nabble.com/QueryParser-bug--tf3270956.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Updated: (LUCENE-813) leading wildcard's don't work with
trailing wildcard
Posted by "Doron Cohen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-813?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Doron Cohen updated LUCENE-813:
-------------------------------
Attachment: 813.fix.lead.wildcard.patch
Attached 813.fix.lead.wildcard.patch fixes this by modifying the definition of PREFIXTERM.
The patch includes the test added by Host in the previous patch.
Also, added to QP.jj 2 jdocs comments that were only in QP.java.
I added a few WildCard tests.
All tests pass.
Doron
> leading wildcard's don't work with trailing wildcard
> ----------------------------------------------------
>
> Key: LUCENE-813
> URL: https://issues.apache.org/jira/browse/LUCENE-813
> Project: Lucene - Java
> Issue Type: Bug
> Reporter: Hoss Man
> Assigned To: Doron Cohen
> Attachments: 813.fix.lead.wildcard.patch, qp-leading-wildcard.patch
>
>
> As reported by Antony Bowesman, leading wildcards don't work when there is a trailing wildcard character -- instead a PrefixQuery is constructed.
> http://www.nabble.com/QueryParser-bug--tf3270956.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-813) leading wildcard's don't work with
trailing wildcard
Posted by "Doron Cohen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475540 ]
Doron Cohen commented on LUCENE-813:
------------------------------------
I fixed the PREFIX definition in QueryParser.jj, changed:
(<_TERM_START_CHAR> | "*") (<_TERM_CHAR>)* "*" >
to
("*") | ( <_TERM_START_CHAR> (<_TERM_CHAR>)* "*" ) >
which I think is more correct, and this solved the problem.
However this caused another parsing test (testSimple) to fail - aparently from other reasons: the standard analyzer used in that test is lower casing the query tokens, which have umlauts - and this fails, because the lower casing is done char by char (Character.lowercase). I think that the wrong definition of PREFIXTERM was masking this behavior before. I am not sure yet if this is a bug, but for testSimple to pass for now I would modify the test to use a non lowercasing analyzer when umlauts are present. Please comment if you think this is a bug.
Another tehnical issue that came up is line endings - compiling on XP, using cygwin, the javacc result files had wrong line endings.
Fixed that with
perl -p -e 's/(\r\n|\n|\r)/\n/g' QueryParser.java_fromJavacc > QueryParser,java
Do others have this problem?
Is there is a standard solution for this (other than installing *Nix?)
If not I may look into allowing to fix this by build.xml.
Will have a patch with the fix later today.
> leading wildcard's don't work with trailing wildcard
> ----------------------------------------------------
>
> Key: LUCENE-813
> URL: https://issues.apache.org/jira/browse/LUCENE-813
> Project: Lucene - Java
> Issue Type: Bug
> Reporter: Hoss Man
> Assigned To: Doron Cohen
> Attachments: qp-leading-wildcard.patch
>
>
> As reported by Antony Bowesman, leading wildcards don't work when there is a trailing wildcard character -- instead a PrefixQuery is constructed.
> http://www.nabble.com/QueryParser-bug--tf3270956.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org