Package org.elasticsearch.action.get

Examples of org.elasticsearch.action.get.GetResponse.sourceAsString()


    public Article findBySlug(String slug) {
        GetResponse response = node.client().prepareGet(INDEX, TYPE, slug).execute().actionGet();
        if (response.exists()) {
            try {
                return json.readValue(response.sourceAsString(), Article.class);
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.