How to delete type?thanks

i don't know es5.0 how detele type
please help me

thanks~

You cannot, the closest you can get is https://www.elastic.co/guide/en/elasticsearch/reference/5.0/docs-delete-by-query.html

And sometimes when you don't have important data (well when you just start to play with elasticsearch) it's better to remove the full index.

first very thank you reply my quesition

if i data not has important data,i will chose delete index ,but now is i in input multiple type but of one type fail i want delete this error type after re-input

**i want to try _delete_by_query this is my code **
curl -XPOST http://localhost:9200/myindex/wantDeleteType/_delete_by_query { "query": { "range": { "id":{"gte":1} } } }

If you want to delete a type because you want to change the mapping, this will not work.
If you just want to reindex old data using the same mapping then you don't need to remove old data before that as long as you are using the same I'd.

If you explain a bit more what you are trying to solve here we can give you the best solution for it.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.