You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Sunil Kamath (JIRA)" <ji...@apache.org> on 2006/06/03 04:59:29 UTC

[jira] Created: (LUCENE-588) Escaped wildcard character in wildcard term not handled correctly

Escaped wildcard character in wildcard term not handled correctly
-----------------------------------------------------------------

         Key: LUCENE-588
         URL: http://issues.apache.org/jira/browse/LUCENE-588
     Project: Lucene - Java
        Type: Bug

  Components: QueryParser  
    Versions: 2.0.0    
 Environment: Windows XP SP2
    Reporter: Sunil Kamath


If an escaped wildcard character is specified in a wildcard query, it is treated as a wildcard instead of a literal.
e.g., t\??t is converted by the QueryParser to t??t - the escape character is discarded.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-588) Escaped wildcard character in wildcard term not handled correctly

Posted by "Daniel Naber (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546478 ] 

Daniel Naber commented on LUCENE-588:
-------------------------------------

The problem is that the WildcardQuery itself doesn't have a concept of escaped characters. The escape characters are removed in QueryParser. This mean "t?\?t" will arrive as "t??t" in WildcardQuery and the second question mark is also interpreted as a wildcard.


> Escaped wildcard character in wildcard term not handled correctly
> -----------------------------------------------------------------
>
>                 Key: LUCENE-588
>                 URL: https://issues.apache.org/jira/browse/LUCENE-588
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: QueryParser
>    Affects Versions: 2.0.0
>         Environment: Windows XP SP2
>            Reporter: Sunil Kamath
>
> If an escaped wildcard character is specified in a wildcard query, it is treated as a wildcard instead of a literal.
> e.g., t\??t is converted by the QueryParser to t??t - the escape character is discarded.

-- 
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] Issue Comment Edited: (LUCENE-588) Escaped wildcard character in wildcard term not handled correctly

Posted by "Daniel Naber (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546478 ] 

lucenebugs@danielnaber.de edited comment on LUCENE-588 at 11/28/07 3:27 PM:
---------------------------------------------------------------

The problem is that the WildcardQuery itself doesn't have a concept of escaped characters. The escape characters are removed in QueryParser. This mean "t?\\?t" will arrive as "t??t" in WildcardQuery and the second question mark is also interpreted as a wildcard.


      was (Author: lucenebugs@danielnaber.de):
    The problem is that the WildcardQuery itself doesn't have a concept of escaped characters. The escape characters are removed in QueryParser. This mean "t?\?t" will arrive as "t??t" in WildcardQuery and the second question mark is also interpreted as a wildcard.

  
> Escaped wildcard character in wildcard term not handled correctly
> -----------------------------------------------------------------
>
>                 Key: LUCENE-588
>                 URL: https://issues.apache.org/jira/browse/LUCENE-588
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: QueryParser
>    Affects Versions: 2.0.0
>         Environment: Windows XP SP2
>            Reporter: Sunil Kamath
>
> If an escaped wildcard character is specified in a wildcard query, it is treated as a wildcard instead of a literal.
> e.g., t\??t is converted by the QueryParser to t??t - the escape character is discarded.

-- 
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-588) Escaped wildcard character in wildcard term not handled correctly

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

Michael Busch reassigned LUCENE-588:
------------------------------------

    Assignee: Michael Busch

> Escaped wildcard character in wildcard term not handled correctly
> -----------------------------------------------------------------
>
>                 Key: LUCENE-588
>                 URL: https://issues.apache.org/jira/browse/LUCENE-588
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: QueryParser
>    Affects Versions: 2.0.0
>         Environment: Windows XP SP2
>            Reporter: Sunil Kamath
>            Assignee: Michael Busch
>         Attachments: LUCENE-588.patch
>
>
> If an escaped wildcard character is specified in a wildcard query, it is treated as a wildcard instead of a literal.
> e.g., t\??t is converted by the QueryParser to t??t - the escape character is discarded.

-- 
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-588) Escaped wildcard character in wildcard term not handled correctly

Posted by "Luis Alves (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12744427#action_12744427 ] 

Luis Alves commented on LUCENE-588:
-----------------------------------

The new QP has built in support for this.

If someone has time to test it or write some testcases I can help fix any problems that might appear.
The new query parser is in contrib/queryparser. See for more details LUCENE-1567.

> Escaped wildcard character in wildcard term not handled correctly
> -----------------------------------------------------------------
>
>                 Key: LUCENE-588
>                 URL: https://issues.apache.org/jira/browse/LUCENE-588
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: QueryParser
>    Affects Versions: 2.0.0
>         Environment: Windows XP SP2
>            Reporter: Sunil Kamath
>            Priority: Minor
>         Attachments: LUCENE-588.patch
>
>
> If an escaped wildcard character is specified in a wildcard query, it is treated as a wildcard instead of a literal.
> e.g., t\??t is converted by the QueryParser to t??t - the escape character is discarded.

-- 
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] Issue Comment Edited: (LUCENE-588) Escaped wildcard character in wildcard term not handled correctly

Posted by "Daniel Naber (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546478 ] 

lucenebugs@danielnaber.de edited comment on LUCENE-588 at 11/28/07 3:27 PM:
---------------------------------------------------------------

The problem is that the WildcardQuery itself doesn't have a concept of escaped characters. The escape characters are removed in QueryParser. This mean "t?\?t" will arrive as "t??t" in WildcardQuery and the second question mark is also interpreted as a wildcard.


      was (Author: lucenebugs@danielnaber.de):
    The problem is that the WildcardQuery itself doesn't have a concept of escaped characters. The escape characters are removed in QueryParser. This mean "t?\\?t" will arrive as "t??t" in WildcardQuery and the second question mark is also interpreted as a wildcard.

  
> Escaped wildcard character in wildcard term not handled correctly
> -----------------------------------------------------------------
>
>                 Key: LUCENE-588
>                 URL: https://issues.apache.org/jira/browse/LUCENE-588
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: QueryParser
>    Affects Versions: 2.0.0
>         Environment: Windows XP SP2
>            Reporter: Sunil Kamath
>
> If an escaped wildcard character is specified in a wildcard query, it is treated as a wildcard instead of a literal.
> e.g., t\??t is converted by the QueryParser to t??t - the escape character is discarded.

-- 
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-588) Escaped wildcard character in wildcard term not handled correctly

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

Robert Muir updated LUCENE-588:
-------------------------------

    Attachment: LUCENE-588.patch

In the flex branch, WildcardQuery (like RegexpQuery) is just a parser for AutomatonQuery.

its pretty easy to add support for things like this if we still want it. Attached is a patch.

> Escaped wildcard character in wildcard term not handled correctly
> -----------------------------------------------------------------
>
>                 Key: LUCENE-588
>                 URL: https://issues.apache.org/jira/browse/LUCENE-588
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: QueryParser
>    Affects Versions: 2.0.0
>         Environment: Windows XP SP2
>            Reporter: Sunil Kamath
>            Assignee: Michael Busch
>            Priority: Minor
>             Fix For: 3.1
>
>         Attachments: LUCENE-588.patch, LUCENE-588.patch
>
>
> If an escaped wildcard character is specified in a wildcard query, it is treated as a wildcard instead of a literal.
> e.g., t\??t is converted by the QueryParser to t??t - the escape character is discarded.

-- 
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-588) Escaped wildcard character in wildcard term not handled correctly

Posted by "Sunil Kamath (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546743 ] 

Sunil Kamath commented on LUCENE-588:
-------------------------------------

The documentation does state that escaping of the "?" character by prepending a "\" character is supported.

> Escaped wildcard character in wildcard term not handled correctly
> -----------------------------------------------------------------
>
>                 Key: LUCENE-588
>                 URL: https://issues.apache.org/jira/browse/LUCENE-588
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: QueryParser
>    Affects Versions: 2.0.0
>         Environment: Windows XP SP2
>            Reporter: Sunil Kamath
>
> If an escaped wildcard character is specified in a wildcard query, it is treated as a wildcard instead of a literal.
> e.g., t\??t is converted by the QueryParser to t??t - the escape character is discarded.

-- 
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-588) Escaped wildcard character in wildcard term not handled correctly

Posted by "Michael Busch (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546485 ] 

Michael Busch commented on LUCENE-588:
--------------------------------------

True... a solution might be to have the queryparser map escaped chars to some
unused unicode codepoints. Then the WildcardQuery could distinguish escaped
chars. I'd guess that other classes, like FuzzyQuery might have the same problem?

The advantage of such a char mapping is that we can keep the String API and
don't have to add special APIs to the Query objects for the queryparser.

> Escaped wildcard character in wildcard term not handled correctly
> -----------------------------------------------------------------
>
>                 Key: LUCENE-588
>                 URL: https://issues.apache.org/jira/browse/LUCENE-588
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: QueryParser
>    Affects Versions: 2.0.0
>         Environment: Windows XP SP2
>            Reporter: Sunil Kamath
>
> If an escaped wildcard character is specified in a wildcard query, it is treated as a wildcard instead of a literal.
> e.g., t\??t is converted by the QueryParser to t??t - the escape character is discarded.

-- 
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-588) Escaped wildcard character in wildcard term not handled correctly

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546969 ] 

Hoss Man commented on LUCENE-588:
---------------------------------

you're refering to the documentation for the querysyntax, used by the QueryParser ... which is in fact true: you can \ escape both * and ? as far as the QueryParser goes -- but the WildcardQuery class doesn't support (nor does it's documentation advertise) any escape characters.

In a nut shell: you can escape the characters so QueryParser doesn't consider them wildcards -- which will influence whether or not QP builds a WIldcardQuery or a TermQuery, but WildcardQuery doesn't know or care about escape characters.

Consider these examples, and assume a whitespace analyzer....
{code}
parse("lucene") -> new TermQuery("lucene")
parse("lu?ene") -> new WIldcardQuery("lu?ene")
parse("lu\?ene") -> new TermQuery("lu?ene")
parse("lu\?e?e") -> new WIldcardQuery("lu?e?e")
parse("lu\?e\?e") -> new TermQuery("lu?e?e")
{code}
that's why it works the way it does.

as for how to improve it: It seems reasonable for WildcardQuery to have a boolean constructor arg indicating whether or not it should respect "standard" backslash escape sequences ... and then QueryParser could have an option to pass the "raw" string (with escapes) to this new constructor.


> Escaped wildcard character in wildcard term not handled correctly
> -----------------------------------------------------------------
>
>                 Key: LUCENE-588
>                 URL: https://issues.apache.org/jira/browse/LUCENE-588
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: QueryParser
>    Affects Versions: 2.0.0
>         Environment: Windows XP SP2
>            Reporter: Sunil Kamath
>
> If an escaped wildcard character is specified in a wildcard query, it is treated as a wildcard instead of a literal.
> e.g., t\??t is converted by the QueryParser to t??t - the escape character is discarded.

-- 
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-588) Escaped wildcard character in wildcard term not handled correctly

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

Terry Yang updated LUCENE-588:
------------------------------

    Attachment: LUCENE-588.patch

> Escaped wildcard character in wildcard term not handled correctly
> -----------------------------------------------------------------
>
>                 Key: LUCENE-588
>                 URL: https://issues.apache.org/jira/browse/LUCENE-588
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: QueryParser
>    Affects Versions: 2.0.0
>         Environment: Windows XP SP2
>            Reporter: Sunil Kamath
>         Attachments: LUCENE-588.patch
>
>
> If an escaped wildcard character is specified in a wildcard query, it is treated as a wildcard instead of a literal.
> e.g., t\??t is converted by the QueryParser to t??t - the escape character is discarded.

-- 
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-588) Escaped wildcard character in wildcard term not handled correctly

Posted by "Daniel Naber (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546479 ] 

Daniel Naber commented on LUCENE-588:
-------------------------------------

Also, the original report and my comment look confusing because Jira removes the backslash. Imagine a backslash in front of *one* of the question marks.

> Escaped wildcard character in wildcard term not handled correctly
> -----------------------------------------------------------------
>
>                 Key: LUCENE-588
>                 URL: https://issues.apache.org/jira/browse/LUCENE-588
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: QueryParser
>    Affects Versions: 2.0.0
>         Environment: Windows XP SP2
>            Reporter: Sunil Kamath
>
> If an escaped wildcard character is specified in a wildcard query, it is treated as a wildcard instead of a literal.
> e.g., t\??t is converted by the QueryParser to t??t - the escape character is discarded.

-- 
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-588) Escaped wildcard character in wildcard term not handled correctly

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

Michael Busch updated LUCENE-588:
---------------------------------

    Fix Version/s: 3.1
         Assignee: Michael Busch

We'll try to fix this in combination with LUCENE-1823.

> Escaped wildcard character in wildcard term not handled correctly
> -----------------------------------------------------------------
>
>                 Key: LUCENE-588
>                 URL: https://issues.apache.org/jira/browse/LUCENE-588
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: QueryParser
>    Affects Versions: 2.0.0
>         Environment: Windows XP SP2
>            Reporter: Sunil Kamath
>            Assignee: Michael Busch
>            Priority: Minor
>             Fix For: 3.1
>
>         Attachments: LUCENE-588.patch
>
>
> If an escaped wildcard character is specified in a wildcard query, it is treated as a wildcard instead of a literal.
> e.g., t\??t is converted by the QueryParser to t??t - the escape character is discarded.

-- 
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-588) Escaped wildcard character in wildcard term not handled correctly

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

Michael Busch updated LUCENE-588:
---------------------------------

    Lucene Fields: [Patch Available]

> Escaped wildcard character in wildcard term not handled correctly
> -----------------------------------------------------------------
>
>                 Key: LUCENE-588
>                 URL: https://issues.apache.org/jira/browse/LUCENE-588
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: QueryParser
>    Affects Versions: 2.0.0
>         Environment: Windows XP SP2
>            Reporter: Sunil Kamath
>            Assignee: Michael Busch
>            Priority: Minor
>         Attachments: LUCENE-588.patch
>
>
> If an escaped wildcard character is specified in a wildcard query, it is treated as a wildcard instead of a literal.
> e.g., t\??t is converted by the QueryParser to t??t - the escape character is discarded.

-- 
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-588) Escaped wildcard character in wildcard term not handled correctly

Posted by "Terry Yang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552434 ] 

Terry Yang commented on LUCENE-588:
-----------------------------------

I wrote my first patch to this issue. if QueryParser knows the query is wildcard, it will directly pass the original query string to WildcardQuery which knows exactly which character is wildcard or not. i copied part of discardEscapeChar method from QueryParser because discardEscapeChar will throw ParseException which will causes WildcardQuery changed much. i am looking for a help/idea about what is the better way to process this exception?

> Escaped wildcard character in wildcard term not handled correctly
> -----------------------------------------------------------------
>
>                 Key: LUCENE-588
>                 URL: https://issues.apache.org/jira/browse/LUCENE-588
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: QueryParser
>    Affects Versions: 2.0.0
>         Environment: Windows XP SP2
>            Reporter: Sunil Kamath
>
> If an escaped wildcard character is specified in a wildcard query, it is treated as a wildcard instead of a literal.
> e.g., t\??t is converted by the QueryParser to t??t - the escape character is discarded.

-- 
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-588) Escaped wildcard character in wildcard term not handled correctly

Posted by "Michael Busch (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12599630#action_12599630 ] 

Michael Busch commented on LUCENE-588:
--------------------------------------

I think we should add a new constructor to WildcardQuery like this:

{code:java}
  public WildcardQuery(Term term) {
    this(term, WildcardTermEnum.WILDCARD_CHAR, WildcardTermEnum.WILDCARD_STRING);
  }
  
  public WildcardQuery(Term term, char wildcardChar, char wildcardString) {
    super(term);
    this.wildcardChar = wildcardChar;
    this.wildcardString = wildcardString;
    
    this.termContainsWildcard = (term.text().indexOf(wildcardChar) != -1) 
                                || (term.text().indexOf(wildcardString) != -1);
  }
{code}

Then the WildcardQuery doesn't need to know anything about escaping and the QueryParser
can just map wildcard characters that weren't escaped to some other unused chars and can
unescape * and ? chars.

The only disadvantage of this design would be that the WildcardQuery.toString() would not
produce a String anymore that the QueryParser could parse. However, I think the requirement
of Query.toString() to produce a parseable String is not very good anyways, because it adds
a dependency between the Query classes and the QueryParser. I'd prefer to add a method
like:
{code:java}
String toQueryString(Query);
{code}
to the QueryParser. Then Query.toString() wouldn't be tied anymore to a specific QueryParser
implementation and syntax. Thoughts?

Terry are you still around? Would you like to work on a new patch here?

> Escaped wildcard character in wildcard term not handled correctly
> -----------------------------------------------------------------
>
>                 Key: LUCENE-588
>                 URL: https://issues.apache.org/jira/browse/LUCENE-588
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: QueryParser
>    Affects Versions: 2.0.0
>         Environment: Windows XP SP2
>            Reporter: Sunil Kamath
>            Assignee: Michael Busch
>            Priority: Minor
>         Attachments: LUCENE-588.patch
>
>
> If an escaped wildcard character is specified in a wildcard query, it is treated as a wildcard instead of a literal.
> e.g., t\??t is converted by the QueryParser to t??t - the escape character is discarded.

-- 
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-588) Escaped wildcard character in wildcard term not handled correctly

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

Michael Busch updated LUCENE-588:
---------------------------------

    Priority: Minor  (was: Major)

> Escaped wildcard character in wildcard term not handled correctly
> -----------------------------------------------------------------
>
>                 Key: LUCENE-588
>                 URL: https://issues.apache.org/jira/browse/LUCENE-588
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: QueryParser
>    Affects Versions: 2.0.0
>         Environment: Windows XP SP2
>            Reporter: Sunil Kamath
>            Assignee: Michael Busch
>            Priority: Minor
>         Attachments: LUCENE-588.patch
>
>
> If an escaped wildcard character is specified in a wildcard query, it is treated as a wildcard instead of a literal.
> e.g., t\??t is converted by the QueryParser to t??t - the escape character is discarded.

-- 
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-588) Escaped wildcard character in wildcard term not handled correctly

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

Michael Busch reassigned LUCENE-588:
------------------------------------

    Assignee:     (was: Michael Busch)

> Escaped wildcard character in wildcard term not handled correctly
> -----------------------------------------------------------------
>
>                 Key: LUCENE-588
>                 URL: https://issues.apache.org/jira/browse/LUCENE-588
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: QueryParser
>    Affects Versions: 2.0.0
>         Environment: Windows XP SP2
>            Reporter: Sunil Kamath
>            Priority: Minor
>         Attachments: LUCENE-588.patch
>
>
> If an escaped wildcard character is specified in a wildcard query, it is treated as a wildcard instead of a literal.
> e.g., t\??t is converted by the QueryParser to t??t - the escape character is discarded.

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