Missing value key in value count aggregation? (ES 1.3.0)

Hi,

this looks like an error to me? I tried to order a terms aggregation by the
value count sub aggregation an Elasticsearch 1.3.0 throws the following
error: "ReduceSearchPhaseException[Failed to execute phase [query],
[reduce] ]; nested: ElasticsearchIllegalArgumentException[Invalid order
path [grades_count]. Missing value key in [grades_count] which refers to a
multi-value metric aggregation]; "

My Aggregation looks like this (this is only a dumbed down version to
demonstrate the error.)

"aggs": {
"students": {
"terms": {
"field": "name",
"order": {
"grades_count": "desc"
}
},
"aggs": {
"grades_count": {
"value_count": {
"field": "grades"
}
}
}
}
}

Regards,
Valentin

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/d4f7ddd2-c959-4b15-91a2-e1e765e38e3a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

This does seem to be a bug. I have opened #7050
https://github.com/elasticsearch/elasticsearch/issues/7050 for this

On Sunday, 27 July 2014 16:10:05 UTC+1, Valentin wrote:

Hi,

this looks like an error to me? I tried to order a terms aggregation by
the value count sub aggregation an Elasticsearch 1.3.0 throws the following
error: "ReduceSearchPhaseException[Failed to execute phase [query],
[reduce] ]; nested: ElasticsearchIllegalArgumentException[Invalid order
path [grades_count]. Missing value key in [grades_count] which refers to a
multi-value metric aggregation]; "

My Aggregation looks like this (this is only a dumbed down version to
demonstrate the error.)

"aggs": {
"students": {
"terms": {
"field": "name",
"order": {
"grades_count": "desc"
}
},
"aggs": {
"grades_count": {
"value_count": {
"field": "grades"
}
}
}
}
}

Regards,
Valentin

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/171cc9cf-d61a-4b1d-8f89-356f1ff34651%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.