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

FilterQuery (`filter([some_query])`) can be double-cached when used in certain contexts

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • main (10.0)
    • 9.1
    • None
    • None

    Description

      FilterQuery (usually invoked by the filter([inner_query]) syntax in the Standard Query Parser), can be double-cached if it's used in certain contexts. The clearest case is if you specify fq=filter(field_s:value), this will hit the filterCache twice:

      1. once at the top/fq level, as a FilterQuery
      2. once as the inner field_s:value query, wrapped by the FilterQuery.

      This might seem like an anti-pattern, but there are cases where it's really practical to support this usage; namely, bundling main query and fqs into a single query (e.g., to use as the "foreground query" for SKG/relatedness ... but there are likely other cases). Without the ability to consult the cache for wrapped clauses, such a use case hits serious problems.

      Attachments

        Issue Links

          Activity

            People

              magibney Michael Gibney
              magibney Michael Gibney
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4h
                  4h