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

Facet functions emit date fields as ticks

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 5.5.2
    • 7.1
    • Facet Module
    • None

    Description

      When invoking a facet function in the JSON Facet API, TrieDateField is coerced into a numeric value and the result of the function is emitted as numeric instead of being converted back into a formatted date.

      Example:

      curl http://localhost:8983/solr/query?q=*:*&json.facet=

      {most_recent:'max(modified)'}

      Produces (in part):

      "facets":{
      "count":38304,
      "most_recent":1.489012400831E12}}

      The "most_recent" attribute would be more useful if it was converted back to an iso8601 formatted date.

      There was a thread discussing this issue in 2016: http://lucene.472066.n3.nabble.com/min-max-on-date-fields-using-JSON-facets-td4288736.html#a4288781

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              chris.eldredge Chris Eldredge
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: