Merging output of one facet in another facet input

I have a facet which returns proper no of terms but lesser no of count as
many documents have that field missing

I have another field in documents which have that field missing which
contains that term but also other unrelated junk terms also.

I want to run first the first facet and get the correct faceted terms and
then run second facet on different field but want to return only those
terms which are also sent by first facet too.and then agregate the result.

this way i will be able to ignore junk and get proper output of counts.

Can it be done ??

You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
For more options, visit