You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Munendra S N (Jira)" <ji...@apache.org> on 2019/09/28 07:33:00 UTC
[jira] [Created] (SOLR-13799) Add custom key support for Arbitrary
range in JSON range facet
Munendra S N created SOLR-13799:
-----------------------------------
Summary: Add custom key support for Arbitrary range in JSON range facet
Key: SOLR-13799
URL: https://issues.apache.org/jira/browse/SOLR-13799
Project: Solr
Issue Type: New Feature
Security Level: Public (Default Security Level. Issues are Public)
Components: Facet Module
Reporter: Munendra S N
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:
{code:json}
{
"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]"
}
]
}
}
{code}
Response:
{code:json}
{
"buckets": [
{
"val": "20th Century",
"count": 200
},
{
"val": "21st Century",
"count": 300
}
]
}
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org