【发布时间】:2018-06-14 18:19:51
【问题描述】:
我刚开始使用 elasticsearch 5.2。
我正在尝试获取索引中的所有键 如果我有以下映射:
"properties": {
"name": { "type": "text" },
"article": {
"properties": {
"id": { "type": "text" },
"title": { "type": "text"},
"abstract": { "type": "text"},
"author": {
"properties": {
"id": { "type": "text" },
"name": { "type": "text" }
}}}} } }
是否可以获取所有字段的全名? 像这样:
name,
article.id ,
article.title ,
article.abstract ,
article.author.id,
article.author.name
我怎样才能得到它?
【问题讨论】:
-
您是否尝试通过这些字段获取聚合或文档?
-
我正在尝试获取字段名称列表。也许聚合试验令人困惑。我会删除它。谢谢
-
我不明白这将如何只产生索引的字段名称
-
ES 默认返回所有字段,如果要从源中排除字段,可以使用源过滤。也许我无法理解你的问题?
标签: elasticsearch