Hello everybody,

I work on a SOLR version 6.0.0. I use the JSON request API to facet the
results. Here is a SOLR query example :

{"query":"object_type_s:contact","params":{"wt":"json","start":0,"rows":10},"filter":[],"facet":"byNestedGammes":{"type":"terms","field":"gamme","domain":{"blockChildren":"object_type_s:contact"},"sort":"index","limit":-1},"byEtatMarketing":{"type":"terms","field":"etat_marketing_s","sort":"count","limit":-1},"bySuite":{"type":"terms","field":"kits_sans_suite_ss","sort":"count","limit":-1},"byAgeInactivite":{"type":"terms","field":"age_inactivite_s","domain":{"excludeTags":"byAgeInactivite"},"sort":"count","limit":-1},"byTTC":{"type":"terms","field":"TTC_i","domain":{"blockChildren":"object_type_s:contact","filter":"enseigne_s:INI"},"sort":"index","limit":-1}},"sort":""}

For the "byTTC" facet, the "domain" parameter with "blockChildren" returns
all values of TTC_i, a field nested in a parent document. Example :

"id":"693897.870735",
        "asso_i":693897,
        "personne_i":870735,
        "etat_technique_s":"avec_documents",
        "etat_marketing_s":"actif",
        "type_parent_s":"Société",
        "groupe_type_parent_s":"SOCIETE",
        "_childDocuments_":[
        {
          "kit_sans_suite":["false"],
          "TTC_i":300,
          "type_cde_s":"DEVIS",
          "object_type":["order"],
          "enseigne_s":"INI"}

I don't underdtand why the results are the same for the facet byTTC with or
without filter parameter in the domain
("domain":{"blockChildren":"object_type_s:contact","filter":"enseigne_s:INI").

It should filter the results when in a child document "enseigne_s" has the
value "INI", but not...

I thought I had to add the field list parameter to return child documents
with parent documents (like on the solr UI admin : "fl":"*,[child
parentFilter=object_type_s:contact]"), but I can't find the syntax for that
parameter in the JSON request API...

Thanks for your help.

Best

JB



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Reply via email to