You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2010/07/03 00:53:55 UTC

[jira] Created: (SOLR-1982) Leading wildcard queries work for "all" fields if ReversedWildcardFilterFactory is used for "any" field

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, 1.4
            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.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (SOLR-1982) Leading wildcard queries work for "all" fields if ReversedWildcardFilterFactory is used for "any" field

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1982?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884847#action_12884847 ] 

Hoss Man commented on SOLR-1982:
--------------------------------

The behavior comes from the fact that during initialization, SolrQueryParser.checkAllowLeadingWildcards calls setAllowLeadingWildcard(true); if any field type uses ReversedWildcardFilterFactory.

Then in getWildcardQuery, it the specific field type before calling ReverseStringFilter.reverse, but then, regardless of field type, delegates to super.getWildcardQuery which will allow the leading wildcard for *all* fields based on the previous call to setAllowLeadingWildcard(true).

I'm not really sure what the intention was for fields that don't use ReversedWildcardFilterFactory, but the current behavior makes no sense at all.  Either leading wildcards should *only* be allowed for fieldtypes that use ReversedWildcardFilterFactory, or the QParser should have a config option to control it for other fields -- but as it stands it makes no sense what so ever.

> 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.
-
You can reply to this email to add a comment to the issue online.


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