Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggregations: Value Count Agg cannot be used for sort order #7050

colings86 opened this Issue Jul 28, 2014 · 0 comments


None yet
1 participant
Copy link

commented Jul 28, 2014

If a value count agg is used for the sort column of a terms aggregation an exception is thrown stating:

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]; 

Marvel commands to reproduce error:

Setting order to:

"order": {
    "grades_count": "desc"

produces the following error:

   "error": "ReduceSearchPhaseException[Failed to execute phase [fetch], [reduce] ]; nested: ClassCastException[ cannot be cast to$MultiValue]; ",
   "status": 503
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.