In post 2.0, I was using adminClient.indices().prepareDelete(index , type) to delete index type. But this is not working in 2.0 and above. How can I delete a particular index type?
Regards,
In post 2.0, I was using adminClient.indices().prepareDelete(index , type) to delete index type. But this is not working in 2.0 and above. How can I delete a particular index type?
Regards,
From 2.0 and later, a type can't be deleted any more. You can either remove all documents from this type (for example by using delete by query plugin) or remove the entire index. The latter will obviously also delete all the other types.
Hi,
You have to install the plugin delete-by-query : https://www.elastic.co/guide/en/elasticsearch/plugins/2.2/plugins-delete-by-query.html
example : curl -XDELETE 'http://l000bsy001:9200/myindex/_query?q=_type:mytype'
It works fine
© 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.