logo头像
ICQL

420_elasticsearch

dsl

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
must: (表达式1 && 表达式2)
must_not: !(表达式1 && 表达式2)
should: (表达式1 || 表达式2)
filter: 过滤,不参与评分


match_all
match
multi_match

range

term
terms

exists
missing

{
"bool": {
"must": {
"match": {
"title": "how to make millions"
}
},
"must_not": {
"match": {
"tag": "spam"
}
},
"should": [
{
"match": {
"tag": "starred"
}
}
],
"filter": {
"bool": {
"must": [
{
"range": {
"date": {
"gte": "2014-01-01"
}
}
},
{
"range": {
"price": {
"lte": 29.99
}
}
}
],
"must_not": [
{
"term": {
"category": "ebooks"
}
}
]
}
}
}
}
微信打赏

赞赏是不耍流氓的鼓励

转载声明: 商业转载请联系作者获得授权,非商业转载请注明出处 © ICQL