查询title字段的长度小于9的文档1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21GET /nm*/_search
{
"query": {
"filtered": {
"query": {
"match": {
"title": {
"query": "黄晓明和杨颖结婚",
"operator": "and",
"minimum_should_match": "90%"
}
}
},
"filter": {
"script" : {
"script" : "doc['title'].size() < 9"
}
}
}
}
}