How to delete type of index using java api?

i have many types in one index and i want to delete one type from the index.

You have to delete all docs. Look at delete by query plugin.

That being said it won't remove the existing mapping.

Often, you'd better reindex in a new clean index.

1 Like