Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-3492

Caching of ReversedWildcardFilterFactory in SolrQueryParser looks broken

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.6, 4.0-ALPHA
    • 4.1
    • search
    • None

    Description

      The caching of ReversedWildcardFilterFactory in SolrQueryParser looks broken.

      Here's the current code:

      ReversedWildcardFilterFactory fac = leadingWildcards.get(fieldType);
      if (fac == null && leadingWildcards.containsKey(fac)) {
        return fac;
      }

      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:

      ReversedWildcardFilterFactory fac = leadingWildcards.get(fieldType);
      if (fac != null) {
        return fac;
      }

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              michaelryan Michael Ryan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: