The terms facet will use a combo of term values from all the fields as if
it was a single field. What you want to do is probably a script that
combines userId and prodId, and then does a terms facet on the full combo.
Assuming that userId and prodId are full single tokens (i.e. for example
not_analyzed"), you can do something like this:
But, In elasticsearch, How to count the number of terms returned in the
facet array?
I found the doc. Not include facet array length function.
Do you have any suggest??
Thanks again.
Binh Ly於 2014年3月4日星期二UTC+8上午4時16分42秒寫道:
The terms facet will use a combo of term values from all the fields as if
it was a single field. What you want to do is probably a script that
combines userId and prodId, and then does a terms facet on the full combo.
Assuming that userId and prodId are full single tokens (i.e. for example
not_analyzed"), you can do something like this:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.