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

Stats node not null if empty results

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 5.5.3
    • None
    • None

    Description

      Hi all,
      first of all, you're doing a great job with solr, it's amazing
      actually i'm workin' on updating solr to v4.6.1 to v5.5.3 on our production env and i notice that on v5.5.3 the stats node is not null if solr returns 0 results.
      For example: request: <queryForEmptyRequest>&stats=true&stats.field=fa_p1
      v5.5.3
      "response":

      {"numFound":0,"start":0,"docs":[]}

      ,
      "stats":{
      "stats_fields":{
      "fa_p1":

      { "min":null, "max":null, "count":0, "missing":0, "sum":0.0, "sumOfSquares":0.0, "mean":"NaN", "stddev":0.0}

      }}
      v4.6.1
      "response":

      {"numFound": 0,"start": 0,"docs": [ ]}

      ,
      "stats": {
      "stats_fields":

      { "fa_p1": null }

      }

      but i've also noticed that if i disable the mean field on v5.5.3, the stats node for the field fa_p1 is empty

      request: <queryForEmptyRequest>&stats=true&stats.field=

      {!mean=false}

      fa_p1

      "response":

      {"numFound":0,"start":0,"docs":[]}

      ,
      "stats":{
      "stats_fields":{
      "fa_p1":{}}}

      Is this the correct behaviour? Or am i missing something?
      thanks

      Attachments

        Activity

          People

            Unassigned Unassigned
            lovaex Andrea Lovato
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: