1、不显示_source
GET /_search
{
"_source": false,
"query" : {
"term" : { "user" : "kimchy" }
}
}
2/ 显示正则匹配的字段
GET /_search
{
"_source": [ "obj1.*", "obj2.*" ],
"query" : {
"term" : { "user" : "kimchy" }
}
}
3/显示和不显示的include 和exclude
GET /_search
{
"_source": {
"includes": [ "obj1.*", "obj2.*" ],
"excludes": [ "*.description" ]
},
"query" : {
"term" : { "user" : "kimchy" }
}
}
网友评论