I want to delete the logs from elastic search which is having "tags.raw=alkd3".
here tags is a field which will help in differentiating different webserver .
name of the index is access logs
I want to delete the logs from elastic search which is having "tags.raw=alkd3".
here tags is a field which will help in differentiating different webserver .
name of the index is access logs
I hope you are not going to DELETE too many documents. Otherwise, reindexing might be better.
Anyway, Delete By Query is probably what you are looking for: https://www.elastic.co/guide/en/elasticsearch/reference/5.4/docs-delete-by-query.html
I explored and found this code
curl -XDELETE 'http://10.150.86.175:9200/index name/_query' -d '
{
"query": {
"filtered" : {
"query" : {
"term" : { "field name" : "value" }
}}
}
}'
it worked for me
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.