I want to delete the document in elasticserach by timestamp and one of the custom field "cu_hostname".
I want to remove all the documents which are in the specific time stamp which have the value "cu_hostname=abc"
I have written a query for timestamp as below:
POST filebeat-perf-1/_delete_by_query
{
"query":{
"range": {
"@timestamp": {
"gte": "1510511400000",
"lte": "1510597799000"
}
}
}
}
and deleting the custom field:
curl -XPOST '10.193.104.42:9200/filebeat-perf-1/_delete_by_query?conflicts=proceed&pretty' -H 'Content-Type: application/json' -d'
{
"query": {
"wildcard": {
"cu_hostname": "abc"
}
}
}
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.