2018-11-27 20:40:49 -05:00
|
|
|
--
|
|
|
|
:api: get-mappings
|
|
|
|
:request: GetMappingsRequest
|
|
|
|
:response: GetMappingsResponse
|
|
|
|
--
|
|
|
|
|
|
|
|
[id="{upid}-{api}"]
|
2018-06-04 16:31:08 -04:00
|
|
|
=== Get Mappings API
|
|
|
|
|
2018-11-27 20:40:49 -05:00
|
|
|
[id="{upid}-{api}-request"]
|
2018-06-04 16:31:08 -04:00
|
|
|
==== Get Mappings Request
|
|
|
|
|
2019-01-27 19:02:22 -05:00
|
|
|
A +{request}+ can have an optional list of indices:
|
2018-06-04 16:31:08 -04:00
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-11-27 20:40:49 -05:00
|
|
|
include-tagged::{doc-tests-file}[{api}-request]
|
2018-06-04 16:31:08 -04:00
|
|
|
--------------------------------------------------
|
2019-01-27 19:02:22 -05:00
|
|
|
<1> An empty request that will return all indices
|
2018-06-04 16:31:08 -04:00
|
|
|
<2> Setting the indices to fetch mapping for
|
|
|
|
|
|
|
|
==== Optional arguments
|
|
|
|
The following arguments can also optionally be provided:
|
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-11-27 20:40:49 -05:00
|
|
|
include-tagged::{doc-tests-file}[{api}-request-masterTimeout]
|
2018-06-04 16:31:08 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
<1> Timeout to connect to the master node as a `TimeValue`
|
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-11-27 20:40:49 -05:00
|
|
|
include-tagged::{doc-tests-file}[{api}-request-indicesOptions]
|
2018-06-04 16:31:08 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
<1> Options for expanding indices names
|
|
|
|
|
2018-11-27 20:40:49 -05:00
|
|
|
include::../execution.asciidoc[]
|
2018-06-04 16:31:08 -04:00
|
|
|
|
2018-11-27 20:40:49 -05:00
|
|
|
[id="{upid}-{api}-response"]
|
2018-06-04 16:31:08 -04:00
|
|
|
==== Get Mappings Response
|
|
|
|
|
2018-11-27 20:40:49 -05:00
|
|
|
The returned +{response}+ allows to retrieve information about the
|
2018-06-04 16:31:08 -04:00
|
|
|
executed operation as follows:
|
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-11-27 20:40:49 -05:00
|
|
|
include-tagged::{doc-tests-file}[{api}-response]
|
2018-06-04 16:31:08 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
<1> Returning all indices' mappings
|
2019-01-27 19:02:22 -05:00
|
|
|
<2> Retrieving the mappings for a particular index
|
2018-10-22 14:54:04 -04:00
|
|
|
<3> Getting the mappings as a Java Map
|