@@ -169,76 +169,6 @@ curl -X POST "http://127.0.0.1:9200/_bulk" -H 'Content-Type: application/json' -
169
169
{ "post_date" : "2018-12-01 10:00:15", "request_num" : 4 }
170
170
{ "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100005" } }
171
171
{ "post_date" : "2018-12-01 10:00:20", "request_num" : 5 }
172
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100006" } }
173
- { "post_date" : "2018-12-01 10:00:25", "request_num" : 6 }
174
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100007" } }
175
- { "post_date" : "2018-12-01 10:00:30", "request_num" : 7 }
176
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100008" } }
177
- { "post_date" : "2018-12-01 10:00:35", "request_num" : 8 }
178
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100009" } }
179
- { "post_date" : "2018-12-01 10:00:40", "request_num" : 9 }
180
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100010" } }
181
- { "post_date" : "2018-12-01 10:00:45", "request_num" : 10 }
182
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100011" } }
183
- { "post_date" : "2018-12-01 10:00:50", "request_num" : 1 }
184
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100012" } }
185
- { "post_date" : "2018-12-01 10:00:55", "request_num" : 2 }
186
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100013" } }
187
- { "post_date" : "2018-12-01 10:01:00", "request_num" : 3 }
188
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100014" } }
189
- { "post_date" : "2018-12-01 10:01:05", "request_num" : 4 }
190
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100015" } }
191
- { "post_date" : "2018-12-01 10:01:10", "request_num" : 5 }
192
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100016" } }
193
- { "post_date" : "2018-12-01 10:01:15", "request_num" : 6 }
194
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100017" } }
195
- { "post_date" : "2018-12-01 10:01:20", "request_num" : 7 }
196
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100018" } }
197
- { "post_date" : "2018-12-01 10:01:25", "request_num" : 8 }
198
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100019" } }
199
- { "post_date" : "2018-12-01 10:01:30", "request_num" : 9 }
200
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100020" } }
201
- { "post_date" : "2018-12-01 10:01:35", "request_num" : 10 }
202
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100021" } }
203
- { "post_date" : "2018-12-01 10:01:40", "request_num" : 1 }
204
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100022" } }
205
- { "post_date" : "2018-12-01 10:01:45", "request_num" : 2 }
206
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100023" } }
207
- { "post_date" : "2018-12-01 10:01:50", "request_num" : 3 }
208
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100024" } }
209
- { "post_date" : "2018-12-01 10:01:55", "request_num" : 4 }
210
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100025" } }
211
- { "post_date" : "2018-12-01 10:02:00", "request_num" : 5 }
212
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100026" } }
213
- { "post_date" : "2018-12-01 10:02:05", "request_num" : 6 }
214
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100027" } }
215
- { "post_date" : "2018-12-01 10:02:10", "request_num" : 7 }
216
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100028" } }
217
- { "post_date" : "2018-12-01 10:02:15", "request_num" : 8 }
218
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100029" } }
219
- { "post_date" : "2018-12-01 10:02:20", "request_num" : 9 }
220
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100030" } }
221
- { "post_date" : "2018-12-01 10:02:25", "request_num" : 10 }
222
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100031" } }
223
- { "post_date" : "2018-12-01 10:02:30", "request_num" : 1 }
224
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100032" } }
225
- { "post_date" : "2018-12-01 10:02:35", "request_num" : 2 }
226
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100033" } }
227
- { "post_date" : "2018-12-01 10:02:40", "request_num" : 3 }
228
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100034" } }
229
- { "post_date" : "2018-12-01 10:02:45", "request_num" : 4 }
230
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100035" } }
231
- { "post_date" : "2018-12-01 10:02:50", "request_num" : 5 }
232
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100036" } }
233
- { "post_date" : "2018-12-01 10:02:55", "request_num" : 6 }
234
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100037" } }
235
- { "post_date" : "2018-12-01 10:03:00", "request_num" : 7 }
236
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100038" } }
237
- { "post_date" : "2018-12-01 10:03:05", "request_num" : 8 }
238
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100039" } }
239
- { "post_date" : "2018-12-01 10:03:10", "request_num" : 9 }
240
- { "index" : { "_index" : "grafanadb", "_type" : "radar", "_id" : "100040" } }
241
- { "post_date" : "2018-12-01 10:03:15", "request_num" : 10 }
242
172
'
243
173
```
244
174
@@ -251,6 +181,18 @@ curl -X POST "http://127.0.0.1:9200/_bulk" -H 'Content-Type: application/json' -
251
181
'
252
182
```
253
183
184
+ - 清空索引所有数据,分成5个切片去执行删除,cURL 格式:
185
+
186
+ ```
187
+ curl -X POST "http://127.0.0.1:9200/索引名称/类型名称/_delete_by_query?refresh&slices=5&pretty" -H 'Content-Type: application/json' -d'
188
+ {
189
+ "query": {
190
+ "match_all": {}
191
+ }
192
+ }
193
+ '
194
+ ```
195
+
254
196
255
197
256
198
0 commit comments