Question

First of all, it is exciting to know that Solr4.5 has block join support.

I have a very small sample inventory like this -

<doc>
    <field name="uniqueId">10</field>
    <field name="type_s">parent</field>
    <field name="name">Nike</field>
    <field name="type">shirt</field>
    <doc>
        <field name="uniqueId">11</field>
        <field name="colour">Red</field>
        <field name="size">XL</field>            
    </doc>
    <doc>
        <field name="uniqueId">12</field>
        <field name="colour">Red</field>
        <field name="size">L</field>
    </doc>
</doc>

I had a couple of requirements -

  1. I must be able to return parents for a query like - "red L shirt". Done with this.. thanks to these great articles this and that.
  2. What I am not able to figure out is how to go about faceting - I should return Red(1) and size(2) in facet results for a "q=*" query.

Can anyone let me know how to approach this?

Was it helpful?

Solution

Simple block join faceting is now available in Solr 5.3 as part of the new JSON Facet API.

See the bottom of this blog post for examples of how to map parents to children or children to parents before faceting:

http://yonik.com/solr-nested-objects/

OTHER TIPS

Block Join faceting, not available yet, but you might want to watch out for this presentation link above (to be presented)

http://lucenerevolution.org/presentations/#faceting-with-lucene-blockjoinquery

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top