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

[* TO *] queries on DateRange fields miss results

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.5
    • Fix Version/s: 8.6.3, 8.7, main (9.0)
    • Component/s: query parsers
    • Labels:
      None

      Description

      "exists" queries ([* TO *]) on DateRange fields return 0 results regardless of docs in the index with values in that field.

      The issue appears to be that the query is converted into a NormsFieldExistsQuery, even though DateRangeField uses omitNorms=true by default. Probably introduced by SOLR-11746's changes to these optimizable range queries.

      I've attached a script to reproduce the issue (tested on Solr 8.6.2) and screenshots showing showing schema and query-parsing info for the reproduction.

        Attachments

        1. SOLR-14859.patch
          13 kB
          Jason Gerlowski
        2. SOLR-14859.patch
          7 kB
          Jason Gerlowski
        3. SOLR-14859.patch
          9 kB
          Jason Gerlowski
        4. SOLR-14859.patch
          7 kB
          Jason Gerlowski
        5. SOLR-14859.patch
          6 kB
          Jason Gerlowski
        6. SOLR-14859.patch
          2 kB
          Chris M. Hostetter
        7. reproduce.sh
          0.9 kB
          Jason Gerlowski
        8. schema.png
          24 kB
          Jason Gerlowski
        9. query-debug.png
          42 kB
          Jason Gerlowski

          Issue Links

            Activity

              People

              • Assignee:
                gerlowskija Jason Gerlowski
                Reporter:
                gerlowskija Jason Gerlowski
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: