lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikhail Khludnev <gge...@gmail.com>
Subject Re: "Block join faceting is allowed with ToParentBlockJoinQuery only"
Date Thu, 07 Jul 2016 11:25:57 GMT
Hello,

I hardly I understand why you need to find text:(Moby*) guys twice. Find
them once under {parent} is enough from my pov. Are you sure that just
using fl=[child] isn't enough, and why if so?
06 июля 2016 г. 13:48 пользователь "Sebastian Riemer" <s.riemer@littera.eu>
написал:

> Hi,
>
> Please consider the following three queries:
>
>
> (1)    this works:
>
> {
> "responseHeader": {
>     "status": 0,
>     "QTime": 5,
>     "params": {
>       "q": "(type_s:wemi AND {!parent which='type_s:wemi'v='-type_s:wemi
> AND (((text:(Moby*))))'})",
>       "facet.field": "m_mainAuthority_s",
>       "indent": "true",
>       "fq": "m_id_l:[* TO *]",
>       "wt": "json",
>       "facet": "true",
>       "child.facet.field": [
>         "corporateBodyContainer_name_t_ns_fac",
>         "personContainer_name_t_ns_fac"
>       ],
>       "_": "1467801413472"
>     }
>   },
>
> (2)    this also works:
>
> "responseHeader": {
>
>     "status": 0,
>
>     "QTime": 0,
>
>     "params": {
>
>       "q": "(((text:(Moby*))))(type_s:wemi AND {!parent
> which='type_s:wemi'v='-type_s:wemi AND (((text:(Moby*))))'})",
>
>       "indent": "true",
>
>       "fq": "m_id_l:[* TO *]",
>
>       "wt": "json",
>
>       "_": "1467801481986"
>
>     }
>
>   },
>
>
>
> (3)    this does not:
>
> {
>
>   "responseHeader": {
>
>     "status": 400,
>
>     "QTime": 3,
>
>     "params": {
>
>       "q": "(((text:(Moby*))))(type_s:wemi AND {!parent
> which='type_s:wemi'v='-type_s:wemi AND (((text:(Moby*))))'})",
>
>       "facet.field": "m_mainAuthority_s",
>
>       "indent": "true",
>
>       "fq": "m_id_l:[* TO *]",
>
>       "wt": "json",
>
>       "facet": "true",
>
>       "child.facet.field": [
>
>         "corporateBodyContainer_name_t_ns_fac",
>
>         "personContainer_name_t_ns_fac"
>
>       ],
>
>       "_": "1467801452826"
>
>     }
>
>   },
>
>
> (1)    returns me parent documents where the child document contains the
> term "Moby*" including facets on a parent doc field AND facets on child doc
> fields (Nice!)
>
> (2)    returns me parent documents where either the parent document or the
> child document contains the term "Moby*" (Hell yea!)
>
> (3)    Fails with the error message "Block join faceting is allowed with
> ToParentBlockJoinQuery only" (Nay :()
>
> So, I want both, the possibility to search for a term in all fields of the
> parent and the child docs AND to receive the facet counts for fields of the
> parent AND the child. Is what I long for possible, and if so could you
> please punch me in the right direction?
>
> Many thanks,
> Sebastian
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message