You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/elasticsearch/rest-apis/api-conventions.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -421,6 +421,40 @@ GET /_nodes/ra*:2
421
421
GET /_nodes/ra*:2*
422
422
```
423
423
424
+
### Index Component Selectors [api-component-selectors]
425
+
426
+
Some APIs that accept a `<data-stream>`, `<index>`, or `<target>` request path parameter also support *selector syntax*.
427
+
428
+
Some indices and data streams are made of multiple components besides their default data. These other components store additional data which can be queried separately like a regular index. Some APIs may operate on subsets of these index components which can be specified by using a selector suffix.
429
+
430
+
There are currently two selector suffixes supported by {{es}} APIs:
431
+
432
+
`::data`
433
+
: (Indices, data streams) This selector references the default component present on all indices and data streams which holds the regular data contained therein.
434
+
435
+
`::failures`
436
+
: (Data streams only) This component references data stored in a data stream's [failure store](docs-content://manage-data/data-store/data-streams/failure-store.md). This component is only present on data streams.
437
+
438
+
As an example, [search]({{es-apis}}group/endpoint-search), [field capabilities]({{es-apis}}operation/operation-field-caps), and [index stats]({{es-apis}}operation/operation-indices-stats) APIs can all report results from a different component rather than from the default data.
439
+
440
+
Selectors are applied to an index pattern at the end and can be combined with other index pattern syntax like [date math](#api-date-math-index-names) and wildcards.
441
+
442
+
```console
443
+
# Search for regular data on a data stream
444
+
GET my-data-stream/_search
445
+
# Search for failure data on a data stream
446
+
GET my-data-stream::failures/_search
447
+
448
+
# Syntax can be combined with other index pattern syntax (wildcards, multi-target, date math, cross cluster search, etc)
449
+
GET logs-*::failures/_search
450
+
GET logs-*::data,logs-*::failures/_count
451
+
GET remote-cluster:logs-*-*::failures/_search
452
+
GET *::data,*::failures,-logs-rdbms-*::failures/_stats
453
+
GET <logs-{now/d}>::failures/_search
454
+
```
455
+
456
+
457
+
424
458
## Parameters [api-conventions-parameters]
425
459
426
460
Rest parameters (when using HTTP, map to HTTP URL parameters) follow the convention of using underscore casing.
0 commit comments