Elasticsearch查询avg SearchPhaseExecutionException

时间:2015-02-20 17:18:28

标签: elasticsearch average

我有一个索引,我想知道该字段的中等数量"评论"。 这是我的(基本)查询:

GET /prova/_search?search_type=count
{
    "aggs" : {
        "avg_grade" : { "avg" : { "field" : "commenti" } }
    }
}

但出了点问题,回复是:

{
   "error": "SearchPhaseExecutionException[Failed to execute phase [query], all shards failed; shardFailures {[T4svhJ5TTmOfY2-E4_t9YQ][prova][0]: ClassCastException[org.elasticsearch.index.fielddata.plain.PagedBytesIndexFieldData cannot be cast to org.elasticsearch.index.fielddata.IndexNumericFieldData]}{[T4svhJ5TTmOfY2-E4_t9YQ][prova][1]: ClassCastException[org.elasticsearch.index.fielddata.plain.PagedBytesIndexFieldData cannot be cast to org.elasticsearch.index.fielddata.IndexNumericFieldData]}{[T4svhJ5TTmOfY2-E4_t9YQ][prova][2]: ClassCastException[org.elasticsearch.index.fielddata.plain.PagedBytesIndexFieldData cannot be cast to org.elasticsearch.index.fielddata.IndexNumericFieldData]}{[T4svhJ5TTmOfY2-E4_t9YQ][prova][3]: ClassCastException[org.elasticsearch.index.fielddata.plain.PagedBytesIndexFieldData cannot be cast to org.elasticsearch.index.fielddata.IndexNumericFieldData]}{[T4svhJ5TTmOfY2-E4_t9YQ][prova][4]: ClassCastException[org.elasticsearch.index.fielddata.plain.PagedBytesIndexFieldData cannot be cast to org.elasticsearch.index.fielddata.IndexNumericFieldData]}]",
   "status": 500
}

问题是什么?

0 个答案:

没有答案