使用java客户端更新文档
package com.es.demo;
import java.net.InetAddress;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import org.elasticsearch.action.get.GetResponse;
import org.elasticsearch.action.index.IndexRequest;
import org.elasticsearch.action.update.UpdateRequest;
import org.elasticsearch.action.update.UpdateResponse;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
import org.elasticsearch.index.get.GetResult;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import com.fasterxml.jackson.databind.ObjectMapper;
/**
* 更新文档
*
* @author Beck
* @date 2018年2月6日
*/
public class TestES3 {
private static final String HOST = "127.0.0.1";
private static final int PORT = 9300;
private static final ObjectMapper MAPPER = new ObjectMapper();
private Transpor