[
https://issues.apache.org/jira/browse/SOLR-1982?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13003011#comment-13003011
]
David Smiley commented on SOLR-1982:
------------------------------------
A perhaps unexpected side-effect of this bug is that people tell me
{{fieldname:*}} works as expected for them (without knowing what
ReversedWildcardFilterFactory is, it just happens to be defined in the schema
somewhere). They didn't know it's actually not supposed to work, they they
should have done {{fieldname:\[\* TO \*\]}}. I can't blame them from thinking
what they did should work; I agree with them. But it works for the wrong
reasons, as explained in this bug report. I deal a lot with wildcards so I'm
intimately familiar with the issues involved.
I think Hoss is on to the right solution. Always enable leading wildcards for
Lucene's query parser, and then (here's my suggestion) getWildCardQuery() can
let a simple '*' through as equivalent to a [* TO *] range query. If it's not a
simple '*' the existing logic is mostly fine, though it should throw an error
to prevent a leading wildcard when ReversedWildcardFilterFactory isn't used.
> Leading wildcard queries work for "all" fields if
> ReversedWildcardFilterFactory is used for "any" field
> -------------------------------------------------------------------------------------------------------
>
> Key: SOLR-1982
> URL: https://issues.apache.org/jira/browse/SOLR-1982
> Project: Solr
> Issue Type: Bug
> Affects Versions: 1.4, 1.4.1
> Reporter: Hoss Man
>
> As noted on the mailing list...
> http://search.lucidimagination.com/search/document/8064e6877f49e4c4/leading_wildcard_query_strangeness
> ...SolrQueryParse supports leading wild card queries for *any* field as long
> as at least one field type exists in the schema.xml which uses
> ReversedWildcardFilterFactory -- even if that field type is never used.
> This is extremely confusing, and ost likely indicates a bug in how
> SolrQueryParser deals with ReversedWildcardFilterFactory
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]