Examples of GetFieldMappingsResponse


Examples of org.elasticsearch.action.admin.indices.mapping.get.GetFieldMappingsResponse

                .field("store", "yes").field("index", "not_analyzed")
                .endObject()
                .endObject().endObject().string();
        assertAcked(prepareCreate("test").addMapping("type", mapping));
        ensureYellow();
        GetFieldMappingsResponse response = client().admin().indices().prepareGetFieldMappings().addIndices("test").addTypes("type").setFields("_boost").get();
        assertTrue(response.mappings().containsKey("test"));
        assertNotNull(response.fieldMappings("test", "type", "_boost"));
        Map<String, Object> boostSource = response.fieldMappings("test", "type", "_boost").sourceAsMap();
        assertThat((Boolean)((LinkedHashMap)(boostSource.get("_boost"))).get("store"), equalTo(true));
        assertThat((String)((LinkedHashMap)(boostSource.get("_boost"))).get("index"), equalTo("not_analyzed"));
    }
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.