Hi,

I was playing around with the relatively new block join features in Solr 4.6., because I need parent-child relations in my documents. Until now, we are using Solr 4.2.1 with custom plugins, where we have integrated some JIRA patches (mainly https://issues.apache.org/jira/browse/SOLR-2272) to support (block) joins, but now I thought we might get rid of our patched version with custom extensions which we need to update with every Solr release.

Anyhow, the block join itself seems to work, but there is still one major drawback for me - faceting doesn't really make too much sense for me using the block join, because the facet counts are based on the parent docs if I join from childs to parents.

So in my example, I have e.g. 6 blue t-shirts in different sizes, when I join them to parent docs, I have 2 t-shirts, which is fine because I only want to list the parent articles in my results.. but when I facet over sizes and colors, I *expect* to get the child facet counts, e.g.
att_color
    blue    6
    red    4
    green    2
att_size
    S    4
    L    2
    XL    6
att_price
    12.99    6

so that I can filter further down to my right child article.

But all I *get* is the parent counts, e.g.
att_color
    blue 0
    red    0
    green 0
att_size
    S    0
    L    0
    XL    0
att_price
    12.99    6

where I have no chance to filter down to my desired size etc.

Here is a sample query I use:
http://localhost:8983/solr-4.6.0/ee/select?q={!parent%20which=%27type_s:parent%27}%2Batt_Farbe:Dark-Blue&wt=xml&facet=true&facet.field=att_Groesse&facet.field=oxprice&facet.field=att_Farbe

There is a good description of block joins and the current drawbacks here: http://blog.griddynamics.com/2013/09/solr-block-join-support.html
where the author also states:
"


     Faceting

Facet component for block indexes is quite useful in eCommerce. The trickiest thing is to count SKU field values and aggregate them into product counts like it was described at the earlier posts <http://blog.griddynamics.com/2011/10/solr-experience-search-parent-child.html>.
"

Will this be fixed / added in one of the upcoming versions or do I have to stick with our custom plugins (where we /do/ aggregate the child counts into the parent counts) and update them for Solr 4.6.?

Thank you very much,
Stefan

Reply via email to