一、 查询
1.嵌套文档的查询(nested)
认为嵌套文档查出来的结果里面,只会把符合查询条件的嵌套层内容查出来,其实,他是把嵌套层对应的整个document查出来,所有需要进行过滤。
举个例子
(1)索引设计如下的
{
"settings": {
"index": {
"number_of_shards": "8",
"number_of_replicas": "1"
}
},
"mappings": {
"faq_industry_and_custom_duplication": {
"dynamic": "false",
"_all": {
"enabled": false
},
"properties": {
"botId": {
"type": "keyword"
},
"similarityNum": {
"type": "integer"
},
"questionSet": {
"type": "nested",
"properties"