Package org.elasticsearch.action.get

Examples of org.elasticsearch.action.get.GetRequestBuilder.execute()


     * @return
     */
    public static GetResponse get(String indexName, String indexType, String id) {

        GetRequestBuilder getRequestBuilder = IndexClient.client.prepareGet(indexName, indexType, id);
        GetResponse getResponse = getRequestBuilder.execute().actionGet();
        return getResponse;
    }

    /**
     * Search information on Index from a query
View Full Code Here


    // See if the index version exists and check if it matches. The request will
    // fail if there is no version index
    boolean versionIndexExists = false;
    GetRequestBuilder getRequestBuilder = nodeClient.prepareGet(site.getIdentifier(), VERSION_TYPE, ROOT_ID);
    try {
      GetResponse response = getRequestBuilder.execute().actionGet();
      if (response.exists() && response.field(VERSION) != null) {
        indexVersion = Integer.parseInt((String) response.field(VERSION).getValue());
        versionIndexExists = true;
        logger.debug("Search index version is {}", indexVersion);
      }
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.