How to check if an index and mapping exists in elasticsearch v6.0.1


(Phani Kumar Yadavilli) #1

How to check if an index already exists before creating an index in elasticsearch. I could not find any documentation on this. Please help.


(David Pilato) #2

https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-exists.html


(Phani Kumar Yadavilli) #3

Thank you for quick response. I am looking for Rest High Level Client java api.

https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.0/java-rest-high.html could you please let me know the documentation link.


(David Pilato) #4

It's not supported yet in the HLClient but it's trivial to implement. See https://github.com/dadoonet/fscrawler/blob/master/elasticsearch-client/src/main/java/fr/pilato/elasticsearch/crawler/fs/client/ElasticsearchClient.java#L134


(system) #5

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