M
M
magary42018-01-17 11:48:57
Document-oriented bases
magary4, 2018-01-17 11:48:57

How to add Facet and Join together?

I execute the following query
q=type:productVariant
fq=saugkanaele:*
facet.field:saugkanaele
result

"response":{"numFound":210,"start":0,"docs":[...]},
"facet_fields":{
      "saugkanaele":[
        "1.0",126,
        "2.0",77,
        "4.0",7]}

but I need to get products as a result of the request and not options as above, so I add
{!join from=main_parent_id to=id} type:(productVariant)
and I get an array of documents type=product everything is as it should, but facet counts become 0
i.e. first joins and in the resulting documents the type=product field saugkanaele is not available
, maybe someone knows how to first calculate the count in productVariant and in the selection so that type=product gets instead of options
Thank you

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question