Solr
  1. Solr
  2. SOLR-1023

StatsComponent should support dates (and other non-numeric fields)

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 3.5, 4.0-ALPHA
    • Component/s: None
    • Labels:
      None
    • Environment:

      Mac OS 10.5, java version "1.5.0_16"

      Description

      Currently, the StatsComponent only supports single-value numeric fields:

      http://wiki.apache.org/solr/StatsComponent

      trying to use it with a date field I get an exception like: java.lang.NumberFormatException: For input string: "2009-01-27T20:04:04Z"

      trying to use it with a string I get an error 400 "Stats are valid for single valued numeric values."

      For constructing date facets it would be very useful to be able to get the minimum and maximum date from a DateField within a set of documents. In general, it could be useful to get the minimum and maximum from any field type that can be compared, though that's of less importance.

      1. SOLR-1023.patch
        30 kB
        Chris Male
      2. stats-component-path-nightly-2009-10-08.patch
        25 kB
        Mark Holland
      3. SOLR-1023-against-lucene_3_4_0.patch
        32 kB
        Gunnlaugur Thor Briem
      4. SOLR-1023-against-branch_3x.svn.patch
        32 kB
        Gunnlaugur Thor Briem
      5. SOLR-1023.patch
        33 kB
        Gunnlaugur Thor Briem
      6. SOLR-1023.patch
        33 kB
        Ryan McKinley
      7. SOLR-1023.patch
        34 kB
        Ryan McKinley
      8. SOLR-1023-against-branch_3x.svn.patch
        33 kB
        Gunnlaugur Thor Briem
      9. SOLR-1023-CHANGES.TXT.trunk.patch
        0.5 kB
        Gunnlaugur Thor Briem
      10. SOLR-1023-CHANGES.TXT.branch_3x.patch
        0.5 kB
        Gunnlaugur Thor Briem
      11. SOLR-1023-CHANGES.TXT.branch_3x.patch
        0.5 kB
        Gunnlaugur Thor Briem

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Ryan McKinley
              Reporter:
              Peter Wolanin
            • Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development