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