lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Ryan (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SOLR-3492) Caching of ReversedWildcardFilterFactory in SolrQueryParser looks broken
Date Mon, 28 May 2012 00:55:22 GMT
Michael Ryan created SOLR-3492:
----------------------------------

             Summary: Caching of ReversedWildcardFilterFactory in SolrQueryParser looks broken
                 Key: SOLR-3492
                 URL: https://issues.apache.org/jira/browse/SOLR-3492
             Project: Solr
          Issue Type: Bug
          Components: search
    Affects Versions: 3.6, 4.0
            Reporter: Michael Ryan
            Priority: Minor


The caching of ReversedWildcardFilterFactory in SolrQueryParser looks broken.

Here's the current code:
{code}ReversedWildcardFilterFactory fac = leadingWildcards.get(fieldType);
if (fac == null && leadingWildcards.containsKey(fac)) {
  return fac;
}{code}

That doesn't quite make sense - fac will never be returned, as leadingWildcards will never
contain a null key. I think this is probably what was intended:
{code}ReversedWildcardFilterFactory fac = leadingWildcards.get(fieldType);
if (fac != null) {
  return fac;
}{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Mime
View raw message