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

Jason Gerlowski commented on SOLR-14921:
----------------------------------------

I'll qualify my comments below by admitting upfront that my understanding of 
Solr's faceting code is surface-level at best.  If what I say about performance 
below is incorrect, just tell me so.  That said...

The "templated bucketed facet query" syntax looks very powerful and worth 
pursuing generally, but I wonder if it'd have different (worse) performance 
characteristics for whitelist-of-terms scenario specifically.

In traditional faceting, the whitelist-of-terms support computes a single 
docset for the domain and then gathers counts for the N whitelisted values from 
that single docset.  The JSON Faceting implementation you propose would require 
computing N different domains entirely, one for each term.  I suspect (but 
don't know) that this would be costlier than the traditional implementation.

If that ignorant hand-waving about performance holds any water at all, then 
maybe a different approach makes sense here in addition to having TBFQ for 
other use cases.

> 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