@Test public void testMappingNodeClient() throws Exception { final NodeClient es = new NodeClient().flushInterval(TimeValue.timeValueSeconds(5)).newClient(client("1")); es.addMapping("test", "{\"test\":{\"properties\":{\"location\":{\"type\":\"geo_point\"}}}}"); es.newIndex("test"); GetMappingsRequest getMappingsRequest = new GetMappingsRequest().indices("test"); GetMappingsResponse getMappingsResponse = es.client().admin().indices().getMappings(getMappingsRequest).actionGet(); logger.info("mappings={}", getMappingsResponse.getMappings()); es.shutdown(); if (es.hasThrowable()) { logger.error("error", es.getThrowable()); } assertFalse(es.hasThrowable()); }