0

我无法从弹性搜索索引中获取字段的基数。映射如下: 在此处输入图像描述

我试图触发的查询如下:

--header 'Content-Type: application/json' \
--data-raw '{
        "aggs": {
            "type_count": {
                "cardinality": {
                    "field": "rawLog.keyword"
                }
            }
        }
}'```

but I am getting 0 in result

```{
    "took": 21,
    "timed_out": false,
    "_shards": {
        "total": 3,
        "successful": 3,
        "skipped": 0,
        "failed": 0
    },
    "hits": {
        "total": {
            "value": 10000,
            "relation": "gte"
        },
        "max_score": null,
        "hits": []
    },
    "aggregations": {
        "type_count": {
            "value": 0
        }
    }
}```
4

0 回答 0