lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-2262) QueryParser should now allow leading '?' wildcards
Date Sun, 14 Feb 2010 01:54:27 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12833488#action_12833488
] 

Robert Muir commented on LUCENE-2262:
-------------------------------------

btw Yonik, in my opinion disallowing these queries with leading wildcards, be it * or ? or
whatever, is rather silly, since we allow even slower fuzzyqueries by default.
so another option would be to do away with this 'setAllowLeadingWildcard' stuff alltogether,
and if you want to disallow something, extend QueryParser yourself and throw ParseException
yourself. I would actually prefer this.

i do think we should provide back compat to duplicate the previous behavior, its perfectly
reasonable that someone would have special handling for these leading wildcards (e.g. Solr
does).

but this issue is simply about the fact that in flex branch, leading ? is now fast, so there
is no excuse to disallow it anymore, hence we should relax the queryparser to only throw a
fit on leading *


> QueryParser should now allow leading '?' wildcards
> --------------------------------------------------
>
>                 Key: LUCENE-2262
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2262
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: QueryParser
>    Affects Versions: Flex Branch
>            Reporter: Robert Muir
>            Assignee: Robert Muir
>            Priority: Minor
>             Fix For: Flex Branch
>
>         Attachments: LUCENE-2262.patch, LUCENE-2262_backwards.patch
>
>
> QueryParser currently throws an exception if a wildcard term begins with the ? operator.
> The docs say this:
> {noformat}
> When set, * or ? are allowed as the first character of a PrefixQuery and WildcardQuery.
> Note that this can produce very slow queries on big indexes. 
> {noformat}
> In the flex branch, this is no longer true. foo?, ?foo, f?oo, these are all the same
from a performance perspective.

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