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

Add custom key support for Arbitrary range in JSON range facet

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Facet Module
    • None

    Description

      In SOLR-13272, support for arbitrary ranges was added. When range is defined, then response key is generated from given range value.
      Add support to pass custom key in the range request

      Request format:

      {
        "pubyear": {
          "type": "range",
          "field": "pubyear_i",
          "intervals": [
            {
              "key": "20th Century"
              "from": 1990,
              "to": 1999,
              "inclusive_to": false,
              "inclusive_from": true
            },
            {
              "key": "21st Century"
              "range": "[2000,2200]"
            }
          ]
        }
      }
      

      Response:

      {
        "buckets": [
          {
            "val": "20th Century",
            "count": 200
          },
          {
            "val": "21st Century",
            "count": 300
          }
        ]
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            munendrasn Munendra S N
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: