elasticsearch - Deleting a type in Elastic Search using curl -


i trying delete type in elastic search using curl script in bat file

echo running curl script curl -xdelete "http://localhost/testing/" -d'' pause 

the response got no handler found uri . looked documentation of elastic search , says use delete query https://www.elastic.co/guide/en/elasticsearch/reference/5.0/docs-delete-by-query.html

how can modify curl script use new api es 2.3

thanks

if want use delete-by-query api delete documents of given type, can this:

curl -xdelete "http://localhost/testing/_query?q=_type:typename" 

however, you're better off deleting index , recreating can modify mapping type see fit.

curl -xdelete "http://localhost/testing/" curl -xput "http://localhost/testing/" -d '{"settings": {...}, "mappings": {...}}' 

Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -