I need to delete hits from elasticsearch for a specefic source file. I tried below curl commands. Nothing worked instead delete all contents from elastic search. Please help to make it work.
How is the "source" field mapped? If it's a text field, it'll be analyzed and you may be running into issues due to analysis (e.g. /path/to/filename.csv could be tokenized into [path, to, filename, csv] and matching many documents).
This is just incorrect, and will delete all your data. You shouldn't specify the _source in the URL.
As a tip, you can run the DBQ query as a regular search first, to make sure it matches the correct documents before deleting.
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.