Scenario: if you want to delete only the data under the index without deleting the index structure, there is no postman tool in the (Windows Environment) server
First, only delete all the data in the index without deleting the index structure
POST 192.168.100.88:9200/my_index/_delete_by_query
get
{
"query": {
"match_all": {}
}
}
Notes:
where my_index is the index name
Second, delete the specified data in the index without deleting the index structure
HEADER
DELETE 192.168.100.88:9200/log_index/log_type/D8D1D480190945C2A50B32D2255AA3D3
Notes.
where log_index is the index name, log_type is the index type, and D8D1D480190945C2A50B32D2255AA3D3 is the document id
Third: delete all data and index structure
DELETE 192.168.100.88:9200/my_index
Notes.
where my_index is the index name
Curl deletion in Windows
First, delete all data, including index structure
curl -X DELETE "http://192.168.100.88:9200/my_index"
Second: delete all data without deleting index structure
curl -XPOST "http://192.168.100.88:9200/log_index/_delete_by_query?pretty=true" -d "{"""query""":{"""match_all""": {}}}"
Among them: note when using curl (double quotation marks must be used in Windows Environment), single quotation mark will report the following error
“‘http” not supported or disabled in libcurl
C:\Users\admin>curl -X DELETE 'http://192.168.100.88:9200/my_index'
curl: (1) Protocol "'http" not supported or disabled in libcurl
Read More:
- On set in pandas_ Index and reset_ Usage of index
- Mysql error when deleting the table structure: Error Code: 1217. Cannot delete or update a parent row: a foreign key constraint fails
- Index error: invalid index to scalar variable
- The route addition failed: Either the interface index is wrong or the gateway do es not lie on the s
- Python common error: if using all scalar values, you must pass an index (four solutions)
- citation/ bibliography is wrongly placed in index area, please delete the placed citation/ bibliogra
- Several methods of deleting all empty lines in text under Linux
- Errors encountered by elasticsearch in creating index and mapping
- Keyerror: “year not in index”
- Description of classifier index in Weka
- Methods of modifying index and columns names by dataframe in pandas
- Elasticsearch in Spring uses Spel to dynamically create Index of Documet class
- Error in creating index by Google elasticsearch head plug-in
- Three solutions to the appearance of notice: undefined index in PHP
- [Elasticsearch] es 7.12 Root mapping definition has unsupported parameters: _all
- Problem solving: Pandas: keyerror: [ ] not in index
- correcting error in index $I30 for file 11031
- Lock wait timeout exceeded — transaction and index
- Datagrip import & export table structure and data
- bad index file sha1 signature fatal