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

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

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4
    • 3.5, 4.0-ALPHA
    • None
    • None
    • 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.

      Attachments

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

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ryantxu Ryan McKinley
            pwolanin Peter Wolanin
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment