I asked a question similar with this topic before. It was about group by on
two field with term stat by scripting. Igor Motov ansered my question
(thank him.). The query is like;
The term part of term_stat facet is key_field and the statistical part of
term_stat is value_field if I didn't misunderstand. value_field can be
value_script. Hence we can include our custom scripts. But when I need to
group by operation on two field I should do it with key_field which
represents term facet. But there is no key_script property which provide
group by operation on multiple field, in term_stat. Actually I couldn't
find this. Is there a way to define key_field as key_script to make group
by operation on two field or can ES support this.
Unfortunately, that's current limitation of terms_stats. I would advise
again to just index this pair as a field.
On Wednesday, January 23, 2013 9:43:10 AM UTC-5, Whispered wrote:
I asked a question similar with this topic before. It was about group by
on two field with term stat by scripting. Igor Motov ansered my question
(thank him.). The query is like;
The term part of term_stat facet is key_field and the statistical part of
term_stat is value_field if I didn't misunderstand. value_field can be
value_script. Hence we can include our custom scripts. But when I need to
group by operation on two field I should do it with key_field which
represents term facet. But there is no key_script property which provide
group by operation on multiple field, in term_stat. Actually I couldn't
find this. Is there a way to define key_field as key_script to make group
by operation on two field or can ES support 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.