I execute the command via elasticsearch header, here are the result
{
"took": 25,
"timed_out": false,
"_shards": {
"total": 35,
"successful": 30,
"skipped": 0,
"failed": 5,
"failures": [
{
"shard": 0,
"index": "indexname",
"node": "61impylyQ2iHT_KPVZ2kig",
"reason": {
"type": "illegal_argument_exception",
"reason": "Fielddata is disabled on text fields by default. Set fielddata=true on [D010010] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."
}
}
]
},
"hits": {
"total": 0,
"max_score": 0,
"hits":
},
"aggregations": {
"aggs_name": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets":
}
}
}
You need to change the mapping for the field type to keyword if you want to compute aggregations.
If you are using default mapping, try to run the agg on type.keyword instead.
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.