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

Caching of ReversedWildcardFilterFactory in SolrQueryParser looks broken

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.6, 4.0-ALPHA
    • Fix Version/s: 4.1
    • Component/s: search
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: