elasticsearch API

search

使用keyword使得搜尋條件必須完全符合

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
GET people-2023.04/_search
{ "query":
{
"bool": {
"must": [
{
"range": {
"@timestamp": {
"gt" : "2023-04-08T10:22:28Z",
"lt" : "2023-04-08T10:22:44Z"
}
}
},
{
"match": {
"StreamID.keyword": "eb2baea2-d52c-434c-af44-256c0301f4df"
}
}
]
}
}
}

delete

1
2
3
4
5
6
7
8
9
10
POST poc/_delete_by_query
{
"query":{
"range":{
"@timestamp":{
"gt" : "2018-05-04T23:04:00Z"
}
}
}
}
Author

Steven

Posted on

2023-05-24

Updated on

2025-01-14

Licensed under

Comments