Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Hi,
In normal facet request below can be used to filter the facet terms. I am not able to do the same using json.facet. It would be useful in case of multivalued field facet and only filtered terms needs to be returned.
Limiting Facet with Certain Terms
To limit field facet with certain terms specify them comma separated with terms local parameter. Commas and quotes in terms can be escaped with backslash, as in \,. In this case facet is calculated on a way similar to facet.method=enum , but ignores facet.enum.cache.minDf. For example:
facet.field={!terms='alfa,betta,with\,with\',with space'}symbol
{{}}
https://lucene.apache.org/solr/guide/6_6/faceting.html
Just like prefix parameter in json.facet I think we can add terms parameter and use it. Something like below.
json.facet={facets:{type:terms,field:field1,terms:"a,b,c"}}