You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Peter Schäfer (JIRA)" <ji...@apache.org> on 2006/01/23 13:56:09 UTC

[jira] Created: (LUCENE-489) Wildcard Queries with leading "*"

Wildcard Queries with leading "*"
---------------------------------

         Key: LUCENE-489
         URL: http://issues.apache.org/jira/browse/LUCENE-489
     Project: Lucene - Java
        Type: Wish
  Components: QueryParser  
    Reporter: Peter Schäfer


It would be nice to have wildcard queries with a leading wildcard ("?" or "*").

I'm aware that this is a well-known issue, and I do understand the reasons behind it,
but try explaining that to our end-users ... :-(




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


Re: [jira] Created: (LUCENE-489) Wildcard Queries with leading "*"

Posted by John Haxby <jc...@scalix.com>.
Peter Schäfer (JIRA) wrote:

>It would be nice to have wildcard queries with a leading wildcard ("?" or "*").
>
>I'm aware that this is a well-known issue, and I do understand the reasons behind it,
>but try explaining that to our end-users ... :-(
>  
>
I'm sure someone mentioned this a while back, but there's a technique 
that we used for an LDAP server that's applicable here.   It's a bit 
like injecting synonyms: you'd have, say, a SubwordFilter that given 
"brown" would emit "rown" and "own" at the same position.  A "*own" 
query would then simply drop the leading wildcard and look for the 
word.   We stopped at three letters in the LDAP server.   An alternative 
is to use a ReverseAlternativeFilter (say) that emits "brown" and 
"nworb" at the same position, but that only deals with prefix or postfix 
wildcards, but not both.

I'm not sure how you'd stop "own" matching "brown" though.   If someone 
could come up with some example code I don't suppose I'd be the only one 
who would be interested!

jch

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


[jira] Commented: (LUCENE-489) Allow QP subclasses to support Wildcard Queries with leading "*"

Posted by "Steven Parkes (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/LUCENE-489?page=comments#action_12443888 ] 
            
Steven Parkes commented on LUCENE-489:
--------------------------------------

Uhh ... can I ask why the assignee change? I shouldn't work on this anymore?

> Allow QP subclasses to support Wildcard Queries with leading "*"
> ----------------------------------------------------------------
>
>                 Key: LUCENE-489
>                 URL: http://issues.apache.org/jira/browse/LUCENE-489
>             Project: Lucene - Java
>          Issue Type: Wish
>          Components: QueryParser
>            Reporter: Peter Schäfer
>         Assigned To: Otis Gospodnetic
>             Fix For: 2.1
>
>         Attachments: LUCENE-489.patch, qp.diff
>
>
> It would be usefull for some users if the logic that prevents QueryParser from creating WIldcardQueries with leading wildcard characters ("?" or "*") be moved from the grammer into the base implimentation of getWildcardQuery so that it may be overridden in subclasses without needing to modifiy the grammer directly.

-- 
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] Updated: (LUCENE-489) Allow QP subclasses to support Wildcard Queries with leading "*"

Posted by "Steven Parkes (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/LUCENE-489?page=all ]

Steven Parkes updated LUCENE-489:
---------------------------------

    Attachment: LUCENE-489.patch

I was looking in this area (wildcard prefixes) so I figured I might as well do the cleanup.

Dan's patch, with newly generated javacc-3.2 files. Also added test cases, bothw/ and w/o wildcard prefixes enable.

Includes patches to the javacc files generated from javacc-3.2 (but see also LUCENE-667).

> Allow QP subclasses to support Wildcard Queries with leading "*"
> ----------------------------------------------------------------
>
>                 Key: LUCENE-489
>                 URL: http://issues.apache.org/jira/browse/LUCENE-489
>             Project: Lucene - Java
>          Issue Type: Wish
>          Components: QueryParser
>            Reporter: Peter Schäfer
>         Attachments: LUCENE-489.patch, qp.diff
>
>
> It would be usefull for some users if the logic that prevents QueryParser from creating WIldcardQueries with leading wildcard characters ("?" or "*") be moved from the grammer into the base implimentation of getWildcardQuery so that it may be overridden in subclasses without needing to modifiy the grammer directly.

-- 
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] Updated: (LUCENE-489) Allow QP subclasses to support Wildcard Queries with leading "*"

Posted by "Daniel Naber (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/LUCENE-489?page=all ]

Daniel Naber updated LUCENE-489:
--------------------------------

    Attachment: qp.diff

I wrote this patch that let's users enable the leading wildcard using a method call. It applies to 1.9, but if someone wants to test it and clean it up (so it applies to 2.0) I'd commit it.


> Allow QP subclasses to support Wildcard Queries with leading "*"
> ----------------------------------------------------------------
>
>          Key: LUCENE-489
>          URL: http://issues.apache.org/jira/browse/LUCENE-489
>      Project: Lucene - Java
>         Type: Wish

>   Components: QueryParser
>     Reporter: Peter Schäfer
>  Attachments: qp.diff
>
> It would be usefull for some users if the logic that prevents QueryParser from creating WIldcardQueries with leading wildcard characters ("?" or "*") be moved from the grammer into the base implimentation of getWildcardQuery so that it may be overridden in subclasses without needing to modifiy the grammer directly.

-- 
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-489) Wildcard Queries with leading "*"

Posted by "Peter Schäfer (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/LUCENE-489?page=comments#action_12363796 ] 

Peter Schäfer commented on LUCENE-489:
--------------------------------------

great idea, thanks !

but what about *xyz*   :-(

> Wildcard Queries with leading "*"
> ---------------------------------
>
>          Key: LUCENE-489
>          URL: http://issues.apache.org/jira/browse/LUCENE-489
>      Project: Lucene - Java
>         Type: Wish
>   Components: QueryParser
>     Reporter: Peter Schäfer

>
> It would be nice to have wildcard queries with a leading wildcard ("?" or "*").
> I'm aware that this is a well-known issue, and I do understand the reasons behind it,
> but try explaining that to our end-users ... :-(

-- 
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-489) Wildcard Queries with leading "*"

Posted by "Erik Hatcher (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/LUCENE-489?page=comments#action_12363833 ] 

Erik Hatcher commented on LUCENE-489:
-------------------------------------

FYI - Actually it would not be possible to override getWildcardQuery to reverse a "*foo" query term.  The parser prevents *foo from being parsed before even getting to getWildcardQuery without a change to the .jj grammar.

> Wildcard Queries with leading "*"
> ---------------------------------
>
>          Key: LUCENE-489
>          URL: http://issues.apache.org/jira/browse/LUCENE-489
>      Project: Lucene - Java
>         Type: Wish
>   Components: QueryParser
>     Reporter: Peter Schäfer

>
> It would be nice to have wildcard queries with a leading wildcard ("?" or "*").
> I'm aware that this is a well-known issue, and I do understand the reasons behind it,
> but try explaining that to our end-users ... :-(

-- 
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] Updated: (LUCENE-489) Allow QP subclasses to support Wildcard Queries with leading "*"

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/LUCENE-489?page=all ]

Hoss Man updated LUCENE-489:
----------------------------

        Summary: Allow QP subclasses to support Wildcard Queries with leading "*"  (was: Wildcard Queries with leading "*")
    Description: 
It would be usefull for some users if the logic that prevents QueryParser from creating WIldcardQueries with leading wildcard characters ("?" or "*") be moved from the grammer into the base implimentation of getWildcardQuery so that it may be overridden in subclasses without needing to modifiy the grammer directly.


  was:
It would be nice to have wildcard queries with a leading wildcard ("?" or "*").

I'm aware that this is a well-known issue, and I do understand the reasons behind it,
but try explaining that to our end-users ... :-(





I think the revent comments in this feature request make a legitimate argument about the extensability of wildcard support in the QueryParser -- I see no reason not to reopen this request given a slight change in title and description.

This doens't mean I know of any active work to impliment this change (patches are always welcome) just that I think it's a worthwhile request to leave open.

> Allow QP subclasses to support Wildcard Queries with leading "*"
> ----------------------------------------------------------------
>
>          Key: LUCENE-489
>          URL: http://issues.apache.org/jira/browse/LUCENE-489
>      Project: Lucene - Java
>         Type: Wish

>   Components: QueryParser
>     Reporter: Peter Schäfer

>
> It would be usefull for some users if the logic that prevents QueryParser from creating WIldcardQueries with leading wildcard characters ("?" or "*") be moved from the grammer into the base implimentation of getWildcardQuery so that it may be overridden in subclasses without needing to modifiy the grammer directly.

-- 
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] Resolved: (LUCENE-489) Allow QP subclasses to support Wildcard Queries with leading "*"

Posted by "Otis Gospodnetic (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/LUCENE-489?page=all ]

Otis Gospodnetic resolved LUCENE-489.
-------------------------------------

    Resolution: Fixed

Applied, thanks.

> Allow QP subclasses to support Wildcard Queries with leading "*"
> ----------------------------------------------------------------
>
>                 Key: LUCENE-489
>                 URL: http://issues.apache.org/jira/browse/LUCENE-489
>             Project: Lucene - Java
>          Issue Type: Wish
>          Components: QueryParser
>            Reporter: Peter Schäfer
>         Assigned To: Otis Gospodnetic
>             Fix For: 2.1
>
>         Attachments: LUCENE-489.patch, LUCENE-489.patch, qp.diff
>
>
> It would be usefull for some users if the logic that prevents QueryParser from creating WIldcardQueries with leading wildcard characters ("?" or "*") be moved from the grammer into the base implimentation of getWildcardQuery so that it may be overridden in subclasses without needing to modifiy the grammer directly.

-- 
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-489) Allow QP subclasses to support Wildcard Queries with leading "*"

Posted by "Otis Gospodnetic (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/LUCENE-489?page=comments#action_12443724 ] 
            
Otis Gospodnetic commented on LUCENE-489:
-----------------------------------------

Steven: this patch looks good to me.  Why not (manually) remove those 2 deprecated methods, getColumn and getLine?

> Allow QP subclasses to support Wildcard Queries with leading "*"
> ----------------------------------------------------------------
>
>                 Key: LUCENE-489
>                 URL: http://issues.apache.org/jira/browse/LUCENE-489
>             Project: Lucene - Java
>          Issue Type: Wish
>          Components: QueryParser
>            Reporter: Peter Schäfer
>         Assigned To: Steven Parkes
>             Fix For: 2.1
>
>         Attachments: LUCENE-489.patch, qp.diff
>
>
> It would be usefull for some users if the logic that prevents QueryParser from creating WIldcardQueries with leading wildcard characters ("?" or "*") be moved from the grammer into the base implimentation of getWildcardQuery so that it may be overridden in subclasses without needing to modifiy the grammer directly.

-- 
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-489) Wildcard Queries with leading "*"

Posted by "John Haxby (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/LUCENE-489?page=comments#action_12363822 ] 

John Haxby commented on LUCENE-489:
-----------------------------------

I'm sure someone mentioned on one of the lists a while back, but there's a technique that we used for an LDAP server that's applicable here.   It's a bit like injecting synonyms: you'd have, say, a SubwordFilter that given "brown" would emit "rown" and "own" at the same position.  A "*own" query would then simply drop the leading wildcard and look for the word.   We stopped at three letters in the LDAP server.   An alternative is to use a ReverseAlternativeFilter (say) that emits "brown" and "nworb" at the same position, but that only deals with prefix or postfix wildcards, but not both.

I'm not sure how you'd stop "own" matching "brown" though.   If someone could come up with some example code I don't suppose I'd be the only one who would be interested! 

> Wildcard Queries with leading "*"
> ---------------------------------
>
>          Key: LUCENE-489
>          URL: http://issues.apache.org/jira/browse/LUCENE-489
>      Project: Lucene - Java
>         Type: Wish
>   Components: QueryParser
>     Reporter: Peter Schäfer

>
> It would be nice to have wildcard queries with a leading wildcard ("?" or "*").
> I'm aware that this is a well-known issue, and I do understand the reasons behind it,
> but try explaining that to our end-users ... :-(

-- 
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] Closed: (LUCENE-489) Wildcard Queries with leading "*"

Posted by "Otis Gospodnetic (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/LUCENE-489?page=all ]
     
Otis Gospodnetic closed LUCENE-489:
-----------------------------------


> Wildcard Queries with leading "*"
> ---------------------------------
>
>          Key: LUCENE-489
>          URL: http://issues.apache.org/jira/browse/LUCENE-489
>      Project: Lucene - Java
>         Type: Wish
>   Components: QueryParser
>     Reporter: Peter Schäfer

>
> It would be nice to have wildcard queries with a leading wildcard ("?" or "*").
> I'm aware that this is a well-known issue, and I do understand the reasons behind it,
> but try explaining that to our end-users ... :-(

-- 
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-489) Wildcard Queries with leading "*"

Posted by "Erik Hatcher (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/LUCENE-489?page=comments#action_12363831 ] 

Erik Hatcher commented on LUCENE-489:
-------------------------------------

There are term rotation techniques that allow for efficient wildcard querying.  For example, the word "cat" can be indexed as "cat", "$cat", "t$ca", and "at$c".  For a query of "a*, the search can be rotated to search for a*.

> Wildcard Queries with leading "*"
> ---------------------------------
>
>          Key: LUCENE-489
>          URL: http://issues.apache.org/jira/browse/LUCENE-489
>      Project: Lucene - Java
>         Type: Wish
>   Components: QueryParser
>     Reporter: Peter Schäfer

>
> It would be nice to have wildcard queries with a leading wildcard ("?" or "*").
> I'm aware that this is a well-known issue, and I do understand the reasons behind it,
> but try explaining that to our end-users ... :-(

-- 
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-489) Wildcard Queries with leading "*"

Posted by "Eric Jain (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/LUCENE-489?page=comments#action_12413587 ] 

Eric Jain commented on LUCENE-489:
----------------------------------

Would be nice if this request could be revisited: For those people who do need to add support for wildcards at the beginning of terms (and for whom performance is not an issue) it is rather intimidating to have to write a custom query parser rather than e.g. just override a single method somewhere!

> Wildcard Queries with leading "*"
> ---------------------------------
>
>          Key: LUCENE-489
>          URL: http://issues.apache.org/jira/browse/LUCENE-489
>      Project: Lucene - Java
>         Type: Wish

>   Components: QueryParser
>     Reporter: Peter Schäfer

>
> It would be nice to have wildcard queries with a leading wildcard ("?" or "*").
> I'm aware that this is a well-known issue, and I do understand the reasons behind it,
> but try explaining that to our end-users ... :-(

-- 
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] Resolved: (LUCENE-489) Wildcard Queries with leading "*"

Posted by "Otis Gospodnetic (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/LUCENE-489?page=all ]
     
Otis Gospodnetic resolved LUCENE-489:
-------------------------------------

    Resolution: Won't Fix

You can do this if you create your WildcardQuery's programmatically (i.e. not via QueryParser).
Support for that is not in QueryParser because leading wildcards may not perform well.
This may be mentioned in the FAQ, but I didn't check.

> Wildcard Queries with leading "*"
> ---------------------------------
>
>          Key: LUCENE-489
>          URL: http://issues.apache.org/jira/browse/LUCENE-489
>      Project: Lucene - Java
>         Type: Wish
>   Components: QueryParser
>     Reporter: Peter Schäfer

>
> It would be nice to have wildcard queries with a leading wildcard ("?" or "*").
> I'm aware that this is a well-known issue, and I do understand the reasons behind it,
> but try explaining that to our end-users ... :-(

-- 
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-489) Wildcard Queries with leading "*"

Posted by "Peter Schäfer (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/LUCENE-489?page=comments#action_12363790 ] 

Peter Schäfer commented on LUCENE-489:
--------------------------------------

Thanks, I know that those queries perform badly.

Do you have a hint how to improve those kinds of queries ?
Or is there a chance that we will see a more efficient implementation in the future ?




> Wildcard Queries with leading "*"
> ---------------------------------
>
>          Key: LUCENE-489
>          URL: http://issues.apache.org/jira/browse/LUCENE-489
>      Project: Lucene - Java
>         Type: Wish
>   Components: QueryParser
>     Reporter: Peter Schäfer

>
> It would be nice to have wildcard queries with a leading wildcard ("?" or "*").
> I'm aware that this is a well-known issue, and I do understand the reasons behind it,
> but try explaining that to our end-users ... :-(

-- 
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-489) Wildcard Queries with leading "*"

Posted by "eyal post (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/LUCENE-489?page=comments#action_12369816 ] 

eyal post commented on LUCENE-489:
----------------------------------

I'd like to ask that this issue be reconsidered. I suggest the following:
1. Turn on the built in QueryParser support for leading wildcards (in QueryParser.jj)
2. Disable the support for leading wildcards in the default QueryParser java class implementation but allow users to override that class and enable it there.

I see many people going for different approaches to handling leading wildcard queries through QueryParser and I beleive most of them eventually recompile QueryParser.jj after making the relevant changes there. 

This might not be an issue for Java users (simple run JavaCC again and you have the QueryParser.java source), but it is especially important for users of the ported versions of Lucene (in my case DotLucene). For every Lucene version I have to recreate QueryParser.java using JavaCC and then do the porting job from java to c#.  

> Wildcard Queries with leading "*"
> ---------------------------------
>
>          Key: LUCENE-489
>          URL: http://issues.apache.org/jira/browse/LUCENE-489
>      Project: Lucene - Java
>         Type: Wish
>   Components: QueryParser
>     Reporter: Peter Schäfer

>
> It would be nice to have wildcard queries with a leading wildcard ("?" or "*").
> I'm aware that this is a well-known issue, and I do understand the reasons behind it,
> but try explaining that to our end-users ... :-(

-- 
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-489) Allow QP subclasses to support Wildcard Queries with leading "*"

Posted by "Otis Gospodnetic (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/LUCENE-489?page=comments#action_12443893 ] 
            
Otis Gospodnetic commented on LUCENE-489:
-----------------------------------------

Ooops, sorry, I thought it was ready to be committed.  Can you commit?  Take it back, all yours! :)

> Allow QP subclasses to support Wildcard Queries with leading "*"
> ----------------------------------------------------------------
>
>                 Key: LUCENE-489
>                 URL: http://issues.apache.org/jira/browse/LUCENE-489
>             Project: Lucene - Java
>          Issue Type: Wish
>          Components: QueryParser
>            Reporter: Peter Schäfer
>         Assigned To: Otis Gospodnetic
>             Fix For: 2.1
>
>         Attachments: LUCENE-489.patch, qp.diff
>
>
> It would be usefull for some users if the logic that prevents QueryParser from creating WIldcardQueries with leading wildcard characters ("?" or "*") be moved from the grammer into the base implimentation of getWildcardQuery so that it may be overridden in subclasses without needing to modifiy the grammer directly.

-- 
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] Assigned: (LUCENE-489) Allow QP subclasses to support Wildcard Queries with leading "*"

Posted by "Otis Gospodnetic (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/LUCENE-489?page=all ]

Otis Gospodnetic reassigned LUCENE-489:
---------------------------------------

    Assignee: Otis Gospodnetic  (was: Steven Parkes)

> Allow QP subclasses to support Wildcard Queries with leading "*"
> ----------------------------------------------------------------
>
>                 Key: LUCENE-489
>                 URL: http://issues.apache.org/jira/browse/LUCENE-489
>             Project: Lucene - Java
>          Issue Type: Wish
>          Components: QueryParser
>            Reporter: Peter Schäfer
>         Assigned To: Otis Gospodnetic
>             Fix For: 2.1
>
>         Attachments: LUCENE-489.patch, qp.diff
>
>
> It would be usefull for some users if the logic that prevents QueryParser from creating WIldcardQueries with leading wildcard characters ("?" or "*") be moved from the grammer into the base implimentation of getWildcardQuery so that it may be overridden in subclasses without needing to modifiy the grammer directly.

-- 
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] Reopened: (LUCENE-489) Allow QP subclasses to support Wildcard Queries with leading "*"

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/LUCENE-489?page=all ]
     
Hoss Man reopened LUCENE-489:
-----------------------------


> Allow QP subclasses to support Wildcard Queries with leading "*"
> ----------------------------------------------------------------
>
>          Key: LUCENE-489
>          URL: http://issues.apache.org/jira/browse/LUCENE-489
>      Project: Lucene - Java
>         Type: Wish

>   Components: QueryParser
>     Reporter: Peter Schäfer

>
> It would be usefull for some users if the logic that prevents QueryParser from creating WIldcardQueries with leading wildcard characters ("?" or "*") be moved from the grammer into the base implimentation of getWildcardQuery so that it may be overridden in subclasses without needing to modifiy the grammer directly.

-- 
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-489) Allow QP subclasses to support Wildcard Queries with leading "*"

Posted by "Otis Gospodnetic (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/LUCENE-489?page=comments#action_12444774 ] 
            
Otis Gospodnetic commented on LUCENE-489:
-----------------------------------------

Q: why is this property called "allowZeroLengthPrefixQuery"?  Because instead of XXX*YYY, one can now have just *YYY?  I think "allowLeadingWildcard" would be more descriptive, no?


> Allow QP subclasses to support Wildcard Queries with leading "*"
> ----------------------------------------------------------------
>
>                 Key: LUCENE-489
>                 URL: http://issues.apache.org/jira/browse/LUCENE-489
>             Project: Lucene - Java
>          Issue Type: Wish
>          Components: QueryParser
>            Reporter: Peter Schäfer
>         Assigned To: Otis Gospodnetic
>             Fix For: 2.1
>
>         Attachments: LUCENE-489.patch, qp.diff
>
>
> It would be usefull for some users if the logic that prevents QueryParser from creating WIldcardQueries with leading wildcard characters ("?" or "*") be moved from the grammer into the base implimentation of getWildcardQuery so that it may be overridden in subclasses without needing to modifiy the grammer directly.

-- 
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-489) Wildcard Queries with leading "*"

Posted by "Cheolgoo Kang (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/LUCENE-489?page=comments#action_12363793 ] 

Cheolgoo Kang commented on LUCENE-489:
--------------------------------------

Why don't you reverse those analyzed tokens in another field?

If you have a field named 'CONTENT', make one another 'CONTENT_R' with all indexing terms reversed. eg, CONTENT:lucene, CONTENT_R:enecul. Then the query of "CONTENT:*xyz" is the same with "CONTENT_R:zyx*" and it would work great with custom QueryParser with QueryParser.getWildcardQuery() method overridden.

> Wildcard Queries with leading "*"
> ---------------------------------
>
>          Key: LUCENE-489
>          URL: http://issues.apache.org/jira/browse/LUCENE-489
>      Project: Lucene - Java
>         Type: Wish
>   Components: QueryParser
>     Reporter: Peter Schäfer

>
> It would be nice to have wildcard queries with a leading wildcard ("?" or "*").
> I'm aware that this is a well-known issue, and I do understand the reasons behind it,
> but try explaining that to our end-users ... :-(

-- 
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] Updated: (LUCENE-489) Allow QP subclasses to support Wildcard Queries with leading "*"

Posted by "Steven Parkes (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/LUCENE-489?page=all ]

Steven Parkes updated LUCENE-489:
---------------------------------

    Attachment: LUCENE-489.patch

           I think "allowLeadingWildcard" would be more descriptive

Agree. Changed.

> Allow QP subclasses to support Wildcard Queries with leading "*"
> ----------------------------------------------------------------
>
>                 Key: LUCENE-489
>                 URL: http://issues.apache.org/jira/browse/LUCENE-489
>             Project: Lucene - Java
>          Issue Type: Wish
>          Components: QueryParser
>            Reporter: Peter Schäfer
>         Assigned To: Otis Gospodnetic
>             Fix For: 2.1
>
>         Attachments: LUCENE-489.patch, LUCENE-489.patch, qp.diff
>
>
> It would be usefull for some users if the logic that prevents QueryParser from creating WIldcardQueries with leading wildcard characters ("?" or "*") be moved from the grammer into the base implimentation of getWildcardQuery so that it may be overridden in subclasses without needing to modifiy the grammer directly.

-- 
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] Updated: (LUCENE-489) Allow QP subclasses to support Wildcard Queries with leading "*"

Posted by "Steven Parkes (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/LUCENE-489?page=all ]

Steven Parkes updated LUCENE-489:
---------------------------------

    Lucene Fields: [Patch Available]
    Fix Version/s: 2.1
         Assignee: Steven Parkes

> Allow QP subclasses to support Wildcard Queries with leading "*"
> ----------------------------------------------------------------
>
>                 Key: LUCENE-489
>                 URL: http://issues.apache.org/jira/browse/LUCENE-489
>             Project: Lucene - Java
>          Issue Type: Wish
>          Components: QueryParser
>            Reporter: Peter Schäfer
>         Assigned To: Steven Parkes
>             Fix For: 2.1
>
>         Attachments: LUCENE-489.patch, qp.diff
>
>
> It would be usefull for some users if the logic that prevents QueryParser from creating WIldcardQueries with leading wildcard characters ("?" or "*") be moved from the grammer into the base implimentation of getWildcardQuery so that it may be overridden in subclasses without needing to modifiy the grammer directly.

-- 
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-489) Allow QP subclasses to support Wildcard Queries with leading "*"

Posted by "Steven Parkes (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/LUCENE-489?page=comments#action_12443858 ] 
            
Steven Parkes commented on LUCENE-489:
--------------------------------------

I guess because I am uncomfortable manually modifying automatically generated code. If there's a compelling reason for it, I'd consider it, but it has to be pretty compelling because of the effort required to (remember to) maintain the local modifications. If someone runs javacc themselves, they'll get a different result and have to look at the code to see why the results are different. I don't see that the benefit of removing a few deprecated methods is worth the potential confusion (and time taken to resolve the confusion) (and time taken to remember to do the local mod every time).

> Allow QP subclasses to support Wildcard Queries with leading "*"
> ----------------------------------------------------------------
>
>                 Key: LUCENE-489
>                 URL: http://issues.apache.org/jira/browse/LUCENE-489
>             Project: Lucene - Java
>          Issue Type: Wish
>          Components: QueryParser
>            Reporter: Peter Schäfer
>         Assigned To: Steven Parkes
>             Fix For: 2.1
>
>         Attachments: LUCENE-489.patch, qp.diff
>
>
> It would be usefull for some users if the logic that prevents QueryParser from creating WIldcardQueries with leading wildcard characters ("?" or "*") be moved from the grammer into the base implimentation of getWildcardQuery so that it may be overridden in subclasses without needing to modifiy the grammer directly.

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