lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doron Cohen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-813) leading wildcard's don't work with trailing wildcard
Date Fri, 23 Feb 2007 23:32:05 GMT

    [ 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


Mime
View raw message