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

Allow FiltersQParser (`{!filters param=[...]}`) to tolerate empty `param` args

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • main (10.0)
    • 9.1
    • query parsers
    • None

    Description

      One common use case for FiltersQParser is to bundle filters and main query, e.g. for passing a single-query domain definition to functions, or for finer-grained control over how logical filters are bundled together.

      Consider the first use case: `{!filters param=$q param=$fq}`

      FiltersQParser currently strictly enforces that the referred params must be present and non-empty, and fails hard (throws a SyntaxError) if this is not the case.

      This issue proposes to relax this enforcement, because:

      1. There are legitimate, common use cases for which this requirement is simply an inconvenience (albeit easily worked around by adding a "dummy" fq=*:*), and
      2. It's unclear what practical purpose is served by by the current strict enforcement of non-empty params.

      The proposal is to have e.g. `{!filters param=$fq}`, in the absence of any non-empty fq param, be equivalent to *:*.

      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 - 40m
                  40m