lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <j...@apache.org>
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

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

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
that?)

----

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: https://issues.apache.org/jira/browse/SOLR-11709
>             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
ex=boo}popularity&rows=0&json.facet={
> 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
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message