我正在尝试使用以下查询对特定字段的结果进行分组:
{
"from": 0,
"size": 0,
"fields": [
"exitPage.categoryId"
],
"aggs": {
"check": {
"terms": {
"field": "exitPage.categoryId"
}
}
}
}
Elasticsearch 服务器抛出此异常:
{
"error": "ClassCastException[null]",
"status": 500
}
这也是间歇性的 - 有时它会返回结果,而有时它不会。服务器日志中没有更多的描述性信息。
有人知道这个问题吗?
编辑:按Val的要求添加了错误日志
[2016-02-01 12:42:28,773][DEBUG][action.search.type ] [elastic71] failed to reduce search
org.elasticsearch.action.search.ReduceSearchPhaseException: Failed to execute phase [fetch], [reduce]
at org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction$2.onFailure(TransportSearchQueryThenFetchAction.java:159)
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:41)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassCastException