@elastic/get-field-stats
Get statistics for a numeric field
RUN SKILL get_field_stats()With parameters:
RUN SKILL get_field_stats WITH index_pattern = 'value', field = 'value'| Name | Type | Default | Description |
|---|---|---|---|
| index_pattern | STRING | — | Index pattern to analyze |
| field | STRING | — | Numeric field to calculate stats for |
-- Using curl
curl -u elastic-admin:elastic-password http://localhost:9200/_escript \
-H "Content-Type: application/json" \
-d '{"query": "RUN SKILL get_field_stats()"}'
-- Response
{
"result": [...],
"_meta": {
"execution_id": "abc123",
"duration_ms": 45
}
}