org.elasticsearch.client.indices.GetMappingsRequest Java Examples
The following examples show how to use
org.elasticsearch.client.indices.GetMappingsRequest.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AwsRestHighLevelClient.java From aws-athena-query-federation with Apache License 2.0 | 5 votes |
/** * Gets the mapping for the specified index. * @param index is the index whose mapping will be retrieved. * @return a map containing all the mapping information for the specified index. * @throws IOException */ public LinkedHashMap<String, Object> getMapping(String index) throws IOException { GetMappingsRequest mappingsRequest = new GetMappingsRequest(); mappingsRequest.indices(index); GetMappingsResponse mappingsResponse = indices().getMapping(mappingsRequest, RequestOptions.DEFAULT); return (LinkedHashMap<String, Object>) mappingsResponse.mappings().get(index).sourceAsMap(); }
Example #2
Source File: ElasticVindClient.java From vind with Apache License 2.0 | 4 votes |
public GetMappingsResponse getMappings() throws IOException { final GetMappingsRequest request = ElasticRequestUtils.getMappingsRequest(defaultIndex); return client.indices().getMapping(request, RequestOptions.DEFAULT); }
Example #3
Source File: ElasticRequestUtils.java From vind with Apache License 2.0 | 4 votes |
public static GetMappingsRequest getMappingsRequest(String index) { final GetMappingsRequest request = new GetMappingsRequest(); request.indices(index); return request; }