The JSON based query APIs (including JSON Faceting) use (and unfortunately subtly different) '${NAME}' syntax for dereferencing variables in the "body" of a JSON data structure...
https://lucene.apache.org/solr/guide/8_5/json-request-api.html#parameter-substitution-macro-expansion ...but note that you may need to put "quotes" around the variable de-reference in order to make it a valid JSON string. : Date: Mon, 13 Jul 2020 04:03:50 +0000 : From: Mohamed Sirajudeen Mayitti Ahamed Pillai : <mohamedsirajudeen.mayittiahamedpil...@footlocker.com> : Reply-To: solr-user@lucene.apache.org : To: "solr-user@lucene.apache.org" <solr-user@lucene.apache.org> : Subject: JSON Facet with local parameter : : Is it possible to refer local parameter for Range JSON Facet’s star/end/gap inputs ? : : : I am trying something like below, but it is now working. : http://server:8983/solr/kfl/select?arrivalRange=NOW/DAY-10DAYS&json.facet={"NEW ARRIVALS":{"start":$arrivalRange, "sort":"index","type":"range","field":"pdp_activation_date_dt","gap":"+10DAYS","mincount":1,"limit":-1,"end":"NOW/DAY"}}&q=*:*&rows=0 : : Getting below error, : : "error": {"metadata": ["error-class","org.apache.solr.common.SolrException","root-error-class","org.apache.solr.common.SolrException"],"msg": "Can't parse value $arrivalRange for field: pdp_activation_date_dt","code": 400} : : : How to instruct Solr JSON Facet to reference another parameter that is added to the search request ? : : : : : -Hoss http://www.lucidworks.com/