Created
September 14, 2018 14:30
-
-
Save spati-java/899f82027882a441c27911e1e2578cd4 to your computer and use it in GitHub Desktop.
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
public ProfileDocument findById(String id) throws Exception { | |
GetRequest getRequest = new GetRequest(INDEX, TYPE, id); | |
GetResponse getResponse = client.get(getRequest, RequestOptions.DEFAULT); | |
Map<String, Object> resultMap = getResponse.getSource(); | |
return objectMapper | |
.convertValue(resultMap, ProfileDocument.class); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment