为什么elasticsearch不是强类型的?

时间:2016-08-24 06:29:23

标签: elasticsearch

enter image description here Mapping.json:

{ "XYZ": { "properties" :{
     "p": { "type": "string"  }
     "q": { "type": "boolean" }
     "r": { "type":"nested", "properties": { "s": { "type": "integer"}, "t": { "type": "string" } } }

}
}

http://localhost:9200/myindex/XYZ/1/_create

enter image description here data.json

{
      "p":"p1","q":"true", "r": [ { "t":"sIntegerMissingBefore"}]
} 

enter image description here 即使某些字段丢失,数据端的层次结构更改,弹性搜索接受加载数据而不丢弃数据类型错误

当我们执行搜索嵌套查询时,它会显示一个空的命中对象,即使在拥有嵌套数据后,为什么不对弹性搜索进行类型化?

0 个答案:

没有答案