[
https://issues.apache.org/jira/browse/SOLR-9472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15471604#comment-15471604
]
Hoss Man commented on SOLR-9472:
--------------------------------
In a nutshell: adding {{ex=studies_range}} to your {{facet.pivot}} local params
should give you the results you are looking for
----
The behavior you are seeing was a deliberate choice when adding support for
hanging stats off of pivots (SOLR-6351), because the pivot itself can define
the exclusions to be used when computing the pivot constraint counts (and the
stats associated with each constraint) ... otherwise it's too ambiguous as to
what should happen if different exclusion tags are specified on the facet.pivot
and the stats.field, see these specific comments...
*
https://issues.apache.org/jira/browse/SOLR-6351?focusedCommentId=14091538&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14091538
*
https://issues.apache.org/jira/browse/SOLR-6351?focusedCommentId=14144161&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14144161
{quote}
One final note...
bq. we need to think carefully about "exclusions" because they might be
different
My current thinking (reflected in the steps i've outlined above) is that we
should go this route...
bq. i think what we want in general is for the "ex" localparam of the
stats.field to be ignored when hanging off of a facet.pivot
Of the 2 alternatives i proposed before:
* "union the exclusions" – extremeley impractical.
* "fail if they both specify 'ex' and they aren't identical" – very
possible/easy to do if people think it's less confusing, it just requires a bit
more code. we can easily go this route if we run into problems and decide it
makes the API cleaner.
{quote}
> Statistics tag exclusion doesn't work with pivots.
> --------------------------------------------------
>
> Key: SOLR-9472
> URL: https://issues.apache.org/jira/browse/SOLR-9472
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: SearchComponents - other
> Affects Versions: 6.1
> Reporter: Ivan Georgiev
> Priority: Minor
>
> The ability to exclude certain statistics being affected during filtering
> with tags, as addressed in this issue:
> https://issues.apache.org/jira/browse/SOLR-3177 is working, but when the
> statistics is applied to pivots - it doesn't.
> With parameters like these:
> ```
> "stats.field": ["{!tag=studies_stats min=true max=true
> ex=studies_range}value", "{!min=true max=true ex=studies_range}value"],
> "facet.pivot": "{!stats=studies_stats }category,type,unit"
> ```
> The query like this:
> ```
> fq={!tag=studies_range}-(type:T1 AND category:C1 AND -value:[1000 TO 3000])
> ```
> does _not_ affect the global response's `stats_field` (correct), but it
> _does_ affect the `stats_field`inside each of the pivot components (in the
> response).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]