lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <>
Subject [jira] [Commented] (SOLR-11709) JSON "Stats" Facets should support directly specifying a domain change (for filters/blockjoin/etc...)
Date Fri, 11 May 2018 00:58:00 GMT


Hoss Man commented on SOLR-11709:

bq. How several stats will looks like? eg how to add min(popularity) right there? 

I wasn't suggesting we do this to support multiple stats on the same domain -- just like you
can't currently specify multiple {{type:terms}} facets on the same domain.  You'd have to
either specify the domain redundently (or i imagine it would be more efficient to put the
domain on a {{type:query, query:"\*:\*"}} and nest all the term facets & functions under


FWIW: one thing I realize now that hadn't occured to me when i opened this issue is that customizing
the domain on the stat would complicate -- and probably make it impossible to -- sorting the
parent facet buckets by the stat.

> JSON "Stats" Facets should support directly specifying a domain change (for filters/blockjoin/etc...)
> -----------------------------------------------------------------------------------------------------
>                 Key: SOLR-11709
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Facet Module
>            Reporter: Hoss Man
>            Priority: Major
> AFAICT, the simple string syntax of JSON Facet Modules "statistic facets" (ex: {{foo:"min(fieldA)"}}
) means there is no way to request a statistic with a domain change applied -- stats are always
computed relative to it's immediate parent (ie: the baseset matching the {{q}} for a top level
stat, or the constrained set if a stat is a subfacet of something else)
> This means that things like the simple "fq exclusion" in StatsComponent have no straight
forward equivalent in JSON faceting. 
> The work around appears to be to use a {{type:"query", q:"*:*, domain:...}} parent and
specify the stats you are interested in as sub-facets...
> {code}
> $ curl 'http://localhost:8983/solr/techproducts/query' -d 'q=*:*&omitHeader=true&fq={!tag=boo}id:hoss&stats=true&stats.field={!max=true
> bar: { type:"query", q:"*:*", domain:{excludeTags:boo}, facet: { foo:"max(popularity)"
} } }'
> {
>   "response":{"numFound":0,"start":0,"docs":[]
>   },
>   "facets":{
>     "count":0,
>     "bar":{
>       "count":32,
>       "foo":10}},
>   "stats":{
>     "stats_fields":{
>       "popularity":{
>         "max":10.0}}}}
> {code}

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message