Path parameters
- fields
string | array[string] Required Comma-separated list of fields used to limit returned information. To retrieve all fields, omit this parameter.
Query parameters
- bytes
string The unit used to display byte values.
Values are
b
,kb
,mb
,gb
,tb
, orpb
. - fields
string | array[string] Comma-separated list of fields used to limit returned information.
- h
string | array[string] List of columns to appear in the response. Supports simple wildcards.
- s
string | array[string] List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting
:asc
or:desc
as a suffix to the column name.
GET /_cat/fielddata/{fields}
Console
GET /_cat/fielddata?v=true&fields=body&format=json
resp = client.cat.fielddata(
v=True,
fields="body",
format="json",
)
const response = await client.cat.fielddata({
v: "true",
fields: "body",
format: "json",
});
response = client.cat.fielddata(
v: "true",
fields: "body",
format: "json"
)
$resp = $client->cat()->fielddata([
"v" => "true",
"fields" => "body",
"format" => "json",
]);
curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_cat/fielddata?v=true&fields=body&format=json"
Response examples (200)
Single field data
A successful response from `GET /_cat/fielddata?v=true&fields=body&format=json`. You can specify an individual field in the request body or URL path. This example retrieves heap memory size information for the `body` field.
[
{
"id": "Nqk-6inXQq-OxUfOUI8jNQ",
"host": "127.0.0.1",
"ip": "127.0.0.1",
"node": "Nqk-6in",
"field": "body",
"size": "544b"
}
]
A successful response from `GET /_cat/fielddata/body,soul?v=true&format=json`. You can specify a comma-separated list of fields in the request body or URL path. This example retrieves heap memory size information for the `body` and `soul` fields. To get information for all fields, run `GET /_cat/fielddata?v=true`.
[
{
"id": "Nqk-6inXQq-OxUfOUI8jNQ",
"host": "1127.0.0.1",
"ip": "127.0.0.1",
"node": "Nqk-6in",
"field": "body",
"size": "544b"
},
{
"id": "Nqk-6inXQq-OxUfOUI8jNQ",
"host": "127.0.0.1",
"ip": "127.0.0.1",
"node": "Nqk-6in",
"field": "soul",
"size": "480b"
}
]