Created
November 30, 2011 13:07
-
-
Save anonymous/1409001 to your computer and use it in GitHub Desktop.
get mapping with org.elasticsearch.client.Client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Client esClient = ...; | |
GetRequest getMappingRequest = new GetRequest(indexName, documentType, "_mapping"); | |
GetResponse getMappingResponse = esClient.get(getMappingRequest).actionGet(); | |
if (getMappingResponse.exists()) { | |
return true; | |
} else { | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment