You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Yonik Seeley (JIRA)" <ji...@apache.org> on 2016/04/15 17:50:25 UTC

[jira] [Commented] (SOLR-8998) JSON Facet API child roll-ups

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

Yonik Seeley commented on SOLR-8998:
------------------------------------

Desirable features:
- ability to "pretend" that parent documents have all values of their child documents ( a union() set rollup?)
- numeric rollups (min, max, avg, etc) and the ability to use range faceting over these values

Ideas:
- we already have a syntax for rolling up values over a bucket (avg(field1), min(field2) etc), re-use that as much as possible

Use cases:

We have products, which have multiple SKUs, and we want to facet by color on the products.
{code}
Parent1: { type:product, name:"Solr T-Shirt" }
Child1: { type:SKU, size:L, color:Red, inStock:true}
Child2: { type:SKU, size:L, color:Blue, inStock:false}
Child3: { type:SKU, size:M, color:Red, inStock:true}
Child4: { type:SKU, size:S, color:Blue, inStock:true}

Now, we want to facet by "color" and get back numbers of products (not number of SKUs).  Hence if our query is inStock:true, we want {Blue:1 and Red:1}.
Put another way, we want a virtual "color" field on Parent1 containing all the colors of matching child documents.
{code}





> JSON Facet API child roll-ups
> -----------------------------
>
>                 Key: SOLR-8998
>                 URL: https://issues.apache.org/jira/browse/SOLR-8998
>             Project: Solr
>          Issue Type: New Feature
>          Components: Facet Module
>            Reporter: Yonik Seeley
>
> The JSON Facet API currently has the ability to map between parents and children ( see http://yonik.com/solr-nested-objects/ )
> This issue is about adding a true rollup ability where parents would take on derived values from their children.  The most important part (and the most difficult part) will be the external API.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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