How to delete index Type from index using java api?


(Sam-4) #1

Hi

I want to delete index type from index using java.

Thanks


(Sam-4) #2

i got the idea:
http://www.elasticsearch.org/guide/reference/api/admin-indices-delete-mapping.html

    DeleteMappingRequest deleteMapping=new 

DeleteMappingRequest(indexName).type(indexType);
DeleteMappingResponse actionGet =
client.admin().indices().deleteMapping(type).actionGet();

On Wednesday, April 25, 2012 1:33:21 PM UTC+5:30, sam wrote:

Hi

I want to delete index type from index using java.

Thanks


(Sam-4) #3

after deleting an mapping(type) i have try to create mapping with same
name(type) with same data,i got an exception and when i go for searching i
got zero hit. i have include the log details on attachment.please tell me
where the problem.

Thanks

On Wednesday, April 25, 2012 1:46:06 PM UTC+5:30, sam wrote:

i got the idea:
http://www.elasticsearch.org/guide/reference/api/admin-indices-delete-mapping.html

    DeleteMappingRequest deleteMapping=new 

DeleteMappingRequest(indexName).type(indexType);
DeleteMappingResponse actionGet =
client.admin().indices().deleteMapping(type).actionGet();

On Wednesday, April 25, 2012 1:33:21 PM UTC+5:30, sam wrote:

Hi

I want to delete index type from index using java.

Thanks


(system) #4