0
对于实施例I具有Elasticsearch指数和类型映射如下:Elasticsearch如何在我们搜索文档时获取所有映射字段?
PUT /index
{"mappings": {
"type": {
"properties":{
"title":{
"type":"string"
} ,
"name":{
"type":"string"
},
"warning":{
"type":"string"
}
}
}
} } 和我有一个文档等
Document 1: {"type":"type text","name":"name text"}
现在当我查询文献1,因为我有不索引warning
字段,但我已经创建了它的映射,我需要warning
值为空。这是我的回应应该是{" type":"type text","name":"name text","warning": null}
这是可能的Elasticsearch和/或虽然索引是否需要的地图warning
字段为空或我缺少别的东西。请帮忙。我正在使用Elasticsearch版本2.3.1