[ 
https://issues.apache.org/jira/browse/SOLR-14921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17234003#comment-17234003
 ] 

Michael Gibney commented on SOLR-14921:
---------------------------------------

Thanks for taking a look, [~gerlowskija]! You're right about how the "templated 
bucketed facet query" would work; but checking the traditional faceting code, 
it looks like whitelist-of-terms does essentially exactly the same thing – 
i.e., the call to {{SimpleFacets.getListedTermCounts(...)}} ultimately calls 
{{SolrIndexSearcher.numDocs(...)}} for each specified term. Both this, and the 
way templated bucketed query would work, are close cousins to the {{enum}} 
facet method. So for a relatively static list of specified terms (and/or an 
appropriately-sized {{filterCache}}) I'd expect the performance to be better 
than standard "uninverted/docValues-style" field faceting – and in any case I'd 
definitely expect the performance to be nearly identical across all the 
implementations in question.

 

> terms filter in json.facet
> --------------------------
>
>                 Key: SOLR-14921
>                 URL: https://issues.apache.org/jira/browse/SOLR-14921
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Facet Module
>            Reporter: gopikannan venugopalsamy
>            Priority: Minor
>
> 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.
>  
> h3. 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"}}
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to