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

Hoss Man commented on SOLR-6353:
--------------------------------


Proposed implementation...

* Modify the Pivot facet code to check for a "range" local param
* if a range tag name is specified, each time a {{NamedList<Integer>}} of "top" 
terms is computed at a given level of the pivot tree (either single node or 
shard request), each of those terms should be applied as a filter on the main 
doc set - the result should be used to construct a {{SimpleFacets}} object
* then {{SimpleFacets}} should be asked to compute the neccessary range facets 
based on the tags.
** {{SimpleFacets}} will need some refactoring..
*** it should probably be changed so instead of all the stateless processing it 
does (see the "{{// per-facet values}}" variables that get re-used by each 
method) it should have structures for modeling each of the types of faceting 
based on the params it's constructed with, and callers (like the pivot faceting 
code) should be able to ask it for the "facet.ranges" it knows about so it can 
inspect them for the tags it cares about and then call some method to compute 
the range facet results.
** the "{{// Distributed facet_ranges}}" logic in {{FacetComponent}} will also 
need refactored into some helper method accessible to the PivotFacet code, so 
it can merge the per-pivot-constraint range results from each shard


> Let Range Facets Hang off of Pivots
> -----------------------------------
>
>                 Key: SOLR-6353
>                 URL: https://issues.apache.org/jira/browse/SOLR-6353
>             Project: Solr
>          Issue Type: Sub-task
>            Reporter: Hoss Man
>
> Conceptually very similar to the previous sibling issues about hanging stats 
> of pivots & ranges: using a "tag" on {{facet.range}} requests, we make it 
> possible to hang a range off the nodes of Pivots.
> Example...
> {noformat}
> facet.pivot={!range=r1}category,manufacturer
> facet.range={tag=r1}price
> {noformat}
> ...with the request above, in addition to computing range facets over the 
> price field for the entire result set, the PivotFacet component will also 
> include all of those ranges for every node of the tree it builds up when 
> generating a pivot of the fields "category,manufacturer"
> This should easily be combinable with the other sibling tasks to hang stats 
> off ranges which hang off pivots. (see parent issue for example)



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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

Reply via email to