Get Mappings API
editGet Mappings API
editGet Mappings Request
editA GetMappingsRequest
can have an optional list of indices and optional list of types:
Optional arguments
editThe following arguments can also optionally be provided:
Timeout to connect to the master node as a |
|
Timeout to connect to the master node as a |
Synchronous Execution
editGetMappingsResponse getMappingResponse = client.indices().getMapping(request, RequestOptions.DEFAULT);
Asynchronous Execution
editThe asynchronous execution of a get mappings request requires both the
GetMappingsRequest
instance and an ActionListener
instance to be passed to
the asynchronous method:
The asynchronous method does not block and returns immediately. Once it is
completed the ActionListener
is called back using the onResponse
method if
the execution successfully completed or using the onFailure
method if it
failed.
A typical listener for GetMappingsResponse
looks like:
Get Mappings Response
editThe returned GetMappingsResponse
allows to retrieve information about the
executed operation as follows: