You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Aditya Gandhi <ag...@gmail.com> on 2018/08/07 05:05:36 UTC

Block Join Faceting in Solr 7.2

I'm querying an Index which has two types of child documents (let's call
them ChildTypeA and ChildTypeB)
I wrap the subqueries for each of these documents in a boolean clause,
something like this:

*q=+{! parent which=type:parent <query_on_child_type_B>} +{! parent
which=type:parent <query_on_child_type_B>}*


I've been trying to get facet counts on documents of ChildTypeA (rolled up
by parent) and I've tried the following approaches


   - Tried Block Join Faceting using the JSON API  i.e. using the
   unique(_root_) approach.
      -  Enabled docValues on _root_
      - *This did not scale well*
   - Tried using the BlockJoinFacet component.
      - Had to customize it since it expects that only one
      *ToParentBlockJoinQuery* clause to be present in the query.
      - Since I needed facet counts only on ChildTypeA, I changed it to
      ignore the clause on ChildTypeB
      - I did not enable docValues on _root_ since it was not mentioned in
      the documentation.
      - *This approach did not scale well*

I needed advice on whether I could have done anything better in any one of
the two approached I've tried so far. Also if there exists some other
approached I could try.
Would using the uniqueBlock in 7.4 help? (Though this would require me to
upgrade my Solr version)

Re: Block Join Faceting in Solr 7.2

Posted by Mikhail Khludnev <mk...@apache.org>.
 uniqueBlock is not faster than BlockJoinFacet in 7.4.

On Tue, Aug 7, 2018 at 8:05 AM Aditya Gandhi <ag...@gmail.com> wrote:

> I'm querying an Index which has two types of child documents (let's call
> them ChildTypeA and ChildTypeB)
> I wrap the subqueries for each of these documents in a boolean clause,
> something like this:
>
> *q=+{! parent which=type:parent <query_on_child_type_B>} +{! parent
> which=type:parent <query_on_child_type_B>}*
>
>
> I've been trying to get facet counts on documents of ChildTypeA (rolled up
> by parent) and I've tried the following approaches
>
>
>    - Tried Block Join Faceting using the JSON API  i.e. using the
>    unique(_root_) approach.
>       -  Enabled docValues on _root_
>       - *This did not scale well*
>    - Tried using the BlockJoinFacet component.
>       - Had to customize it since it expects that only one
>       *ToParentBlockJoinQuery* clause to be present in the query.
>       - Since I needed facet counts only on ChildTypeA, I changed it to
>       ignore the clause on ChildTypeB
>       - I did not enable docValues on _root_ since it was not mentioned in
>       the documentation.
>       - *This approach did not scale well*
>
> I needed advice on whether I could have done anything better in any one of
> the two approached I've tried so far. Also if there exists some other
> approached I could try.
> Would using the uniqueBlock in 7.4 help? (Though this would require me to
> upgrade my Solr version)
>


-- 
Sincerely yours
Mikhail Khludnev