Uploaded image for project: 'Spring Data for Apache Solr'
  1. Spring Data for Apache Solr
  2. DATASOLR-404

Support Date value for StatsResult "mean" parameter

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 3.0 RC1 (Kay)
    • Component/s: Core
    • Labels:
      None
    • Sprint:
      Kay RC1

      Description

      It would be nice to have the mean variable (under SimpleStatsResult) accepts a Date type.

      Currently, the method responsible for mapping the stats result field (ResultHelper#populateStatsResultWithFieldStatsInfo) validates only the mean value as Double

      private static <T extends SimpleStatsResult> T populateStatsResultWithFieldStatsInfo(T statsResult, FieldStatsInfo value) {
          ...
      
          Object mean = value.getMean();
          if (mean instanceof Double) {
              statsResult.setMean((Double) mean);
          }
          
          ...
      }
      

      Also, according to Solr docs, the mean parameter supports Numeric and Date types

        Attachments

          Activity

            People

            Assignee:
            cstrobl Christoph Strobl
            Reporter:
            cturla Charles Turla
            Last updater:
            Oliver Drotbohm
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: