This version of the OpenSearch documentation is no longer maintained. For the latest version, see the current documentation. For information about OpenSearch version maintenance, see Release Schedule and Maintenance Policy.

Index Stats

The Index Stats API provides index statistics. For data streams, the API provides statistics for the stream’s backing indexes. By default, the returned statistics are index level. To receive shard-level statistics, set the level parameter to shards.

When a shard moves to a different node, the shard-level statistics for the shard are cleared. Although the shard is no longer part of the node, the node preserves any node-level statistics to which the shard contributed.

Path and HTTP methods

  1. GET /_stats
  2. GET /<index_ids>/_stats
  3. GET /<index_ids>/_stats/<metric>

Path parameters

The following table lists the available path parameters. All path parameters are optional.

ParameterData typeDescription
<index_ids>StringA comma-separated list of indexes, data streams, or index aliases used to filter results. Supports wildcard expressions. Defaults to _all (*).
<metric>StringA comma-separated list of metric groups that will be included in the response. For valid values, see Metrics. Defaults to all metrics.

Metrics

The following table lists all available metric groups.

MetricDescription
_allReturn all statistics.
completionCompletion suggester statistics.
docsReturns the number of documents and the number of deleted documents that have not yet been merged. Index refresh operations can affect this statistic.
fielddataField data statistics.
flushFlush statistics.
getGet statistics, including missing stats.
indexingIndexing statistics.
mergeMerge statistics.
query_cacheQuery cache statistics.
refreshRefresh statistics.
request_cacheShard request cache statistics.
searchSearch statistics, including suggest operation statistics. Search operations can be associated with one or more groups. You can include statistics for custom groups by providing a groups parameter, which accepts a comma-separated list of group names. To return statistics for all groups, use _all.
segmentsStatistics about memory use of all open segments. If the include_segment_file_sizes parameter is true, this metric includes the aggregated disk usage of each Lucene index file.
storeSize of the index in byte units.
translogTranslog statistics.
warmerWarmer statistics.

Query parameters

The following table lists the available query parameters. All query parameters are optional.

ParameterData typeDescription
expand_wildcardsStringSpecifies the type of indexes to which wildcard expressions can expand. Supports comma-separated values. Valid values are:
- all: Expand to all open and closed indexes, including hidden indexes.
- open: Expand to open indexes.
- closed: Expand to closed indexes.
- hidden: Include hidden indexes when expanding. Must be combined with open, closed, or both.
- none: Do not accept wildcard expressions.
Default is open.
fieldsStringA comma-separated list or a wildcard expression specifying fields to include in the statistics. Specifies the default field list if neither completion_fields nor fielddata_fields is provided.
completion_fieldsStringA comma-separated list or wildcard expression specifying fields to include in field-level completion statistics.
fielddata_fieldsStringA comma-separated list or wildcard expression specifying fields to include in field-level fielddata statistics.
forbid_closed_indicesBooleanSpecifies not to collect statistics for closed indexes. Default is true.
groupsStringA comma-separated list of search groups to include in the search statistics.
levelStringSpecifies the level used to aggregate statistics. Valid values are:
- cluster: Cluster-level statistics.
- indices: Index-level statistics.
- shards: Shard-level statistics.
Default is indices.
include_segment_file_sizesBooleanSpecifies whether to report the aggregated disk usage of each Lucene index file. Only applies to segments statistics. Default is false.
include_unloaded_segmentsBooleanSpecifies whether to include information from segments that are not loaded into memory. Default is false.

Example request: One index

  1. GET /testindex/_stats

copy

Example response

By default, the returned statistics are aggregated in the primaries and total aggregations. The primaries aggregation contains statistics for the primary shards. The total aggregation contains statistics for both primary and replica shards. The following is an example Index Stats API response:

Response

  1. {
  2. "_shards": {
  3. "total": 2,
  4. "successful": 1,
  5. "failed": 0
  6. },
  7. "_all": {
  8. "primaries": {
  9. "docs": {
  10. "count": 4,
  11. "deleted": 0
  12. },
  13. "store": {
  14. "size_in_bytes": 15531,
  15. "reserved_in_bytes": 0
  16. },
  17. "indexing": {
  18. "index_total": 4,
  19. "index_time_in_millis": 10,
  20. "index_current": 0,
  21. "index_failed": 0,
  22. "delete_total": 0,
  23. "delete_time_in_millis": 0,
  24. "delete_current": 0,
  25. "noop_update_total": 0,
  26. "is_throttled": false,
  27. "throttle_time_in_millis": 0
  28. },
  29. "get": {
  30. "total": 0,
  31. "time_in_millis": 0,
  32. "exists_total": 0,
  33. "exists_time_in_millis": 0,
  34. "missing_total": 0,
  35. "missing_time_in_millis": 0,
  36. "current": 0
  37. },
  38. "search": {
  39. "open_contexts": 0,
  40. "query_total": 12,
  41. "query_time_in_millis": 11,
  42. "query_current": 0,
  43. "fetch_total": 12,
  44. "fetch_time_in_millis": 5,
  45. "fetch_current": 0,
  46. "scroll_total": 0,
  47. "scroll_time_in_millis": 0,
  48. "scroll_current": 0,
  49. "point_in_time_total": 0,
  50. "point_in_time_time_in_millis": 0,
  51. "point_in_time_current": 0,
  52. "suggest_total": 0,
  53. "suggest_time_in_millis": 0,
  54. "suggest_current": 0
  55. },
  56. "merges": {
  57. "current": 0,
  58. "current_docs": 0,
  59. "current_size_in_bytes": 0,
  60. "total": 0,
  61. "total_time_in_millis": 0,
  62. "total_docs": 0,
  63. "total_size_in_bytes": 0,
  64. "total_stopped_time_in_millis": 0,
  65. "total_throttled_time_in_millis": 0,
  66. "total_auto_throttle_in_bytes": 20971520
  67. },
  68. "refresh": {
  69. "total": 8,
  70. "total_time_in_millis": 58,
  71. "external_total": 7,
  72. "external_total_time_in_millis": 60,
  73. "listeners": 0
  74. },
  75. "flush": {
  76. "total": 1,
  77. "periodic": 1,
  78. "total_time_in_millis": 21
  79. },
  80. "warmer": {
  81. "current": 0,
  82. "total": 6,
  83. "total_time_in_millis": 0
  84. },
  85. "query_cache": {
  86. "memory_size_in_bytes": 0,
  87. "total_count": 0,
  88. "hit_count": 0,
  89. "miss_count": 0,
  90. "cache_size": 0,
  91. "cache_count": 0,
  92. "evictions": 0
  93. },
  94. "fielddata": {
  95. "memory_size_in_bytes": 0,
  96. "evictions": 0
  97. },
  98. "completion": {
  99. "size_in_bytes": 0
  100. },
  101. "segments": {
  102. "count": 4,
  103. "memory_in_bytes": 0,
  104. "terms_memory_in_bytes": 0,
  105. "stored_fields_memory_in_bytes": 0,
  106. "term_vectors_memory_in_bytes": 0,
  107. "norms_memory_in_bytes": 0,
  108. "points_memory_in_bytes": 0,
  109. "doc_values_memory_in_bytes": 0,
  110. "index_writer_memory_in_bytes": 0,
  111. "version_map_memory_in_bytes": 0,
  112. "fixed_bit_set_memory_in_bytes": 0,
  113. "max_unsafe_auto_id_timestamp": -1,
  114. "remote_store" : {
  115. "upload" : {
  116. "total_upload_size" : {
  117. "started_bytes" : 152419,
  118. "succeeded_bytes" : 152419,
  119. "failed_bytes" : 0
  120. },
  121. "refresh_size_lag" : {
  122. "total_bytes" : 0,
  123. "max_bytes" : 0
  124. },
  125. "max_refresh_time_lag_in_millis" : 0,
  126. "total_time_spent_in_millis" : 516
  127. },
  128. "download" : {
  129. "total_download_size" : {
  130. "started_bytes" : 0,
  131. "succeeded_bytes" : 0,
  132. "failed_bytes" : 0
  133. },
  134. "total_time_spent_in_millis" : 0
  135. }
  136. },
  137. "file_sizes": {}
  138. },
  139. "translog": {
  140. "operations": 0,
  141. "size_in_bytes": 55,
  142. "uncommitted_operations": 0,
  143. "uncommitted_size_in_bytes": 55,
  144. "earliest_last_modified_age": 142622215,
  145. "remote_store" : {
  146. "upload" : {
  147. "total_uploads" : {
  148. "started" : 57,
  149. "failed" : 0,
  150. "succeeded" : 57
  151. },
  152. "total_upload_size" : {
  153. "started_bytes" : 16830,
  154. "failed_bytes" : 0,
  155. "succeeded_bytes" : 16830
  156. }
  157. }
  158. }
  159. },
  160. "request_cache": {
  161. "memory_size_in_bytes": 0,
  162. "evictions": 0,
  163. "hit_count": 0,
  164. "miss_count": 0
  165. },
  166. "recovery": {
  167. "current_as_source": 0,
  168. "current_as_target": 0,
  169. "throttle_time_in_millis": 0
  170. }
  171. },
  172. "total": {
  173. "docs": {
  174. "count": 4,
  175. "deleted": 0
  176. },
  177. "store": {
  178. "size_in_bytes": 15531,
  179. "reserved_in_bytes": 0
  180. },
  181. "indexing": {
  182. "index_total": 4,
  183. "index_time_in_millis": 10,
  184. "index_current": 0,
  185. "index_failed": 0,
  186. "delete_total": 0,
  187. "delete_time_in_millis": 0,
  188. "delete_current": 0,
  189. "noop_update_total": 0,
  190. "is_throttled": false,
  191. "throttle_time_in_millis": 0
  192. },
  193. "get": {
  194. "total": 0,
  195. "time_in_millis": 0,
  196. "exists_total": 0,
  197. "exists_time_in_millis": 0,
  198. "missing_total": 0,
  199. "missing_time_in_millis": 0,
  200. "current": 0
  201. },
  202. "search": {
  203. "open_contexts": 0,
  204. "query_total": 12,
  205. "query_time_in_millis": 11,
  206. "query_current": 0,
  207. "fetch_total": 12,
  208. "fetch_time_in_millis": 5,
  209. "fetch_current": 0,
  210. "scroll_total": 0,
  211. "scroll_time_in_millis": 0,
  212. "scroll_current": 0,
  213. "point_in_time_total": 0,
  214. "point_in_time_time_in_millis": 0,
  215. "point_in_time_current": 0,
  216. "suggest_total": 0,
  217. "suggest_time_in_millis": 0,
  218. "suggest_current": 0
  219. },
  220. "merges": {
  221. "current": 0,
  222. "current_docs": 0,
  223. "current_size_in_bytes": 0,
  224. "total": 0,
  225. "total_time_in_millis": 0,
  226. "total_docs": 0,
  227. "total_size_in_bytes": 0,
  228. "total_stopped_time_in_millis": 0,
  229. "total_throttled_time_in_millis": 0,
  230. "total_auto_throttle_in_bytes": 20971520
  231. },
  232. "refresh": {
  233. "total": 8,
  234. "total_time_in_millis": 58,
  235. "external_total": 7,
  236. "external_total_time_in_millis": 60,
  237. "listeners": 0
  238. },
  239. "flush": {
  240. "total": 1,
  241. "periodic": 1,
  242. "total_time_in_millis": 21
  243. },
  244. "warmer": {
  245. "current": 0,
  246. "total": 6,
  247. "total_time_in_millis": 0
  248. },
  249. "query_cache": {
  250. "memory_size_in_bytes": 0,
  251. "total_count": 0,
  252. "hit_count": 0,
  253. "miss_count": 0,
  254. "cache_size": 0,
  255. "cache_count": 0,
  256. "evictions": 0
  257. },
  258. "fielddata": {
  259. "memory_size_in_bytes": 0,
  260. "evictions": 0
  261. },
  262. "completion": {
  263. "size_in_bytes": 0
  264. },
  265. "segments": {
  266. "count": 4,
  267. "memory_in_bytes": 0,
  268. "terms_memory_in_bytes": 0,
  269. "stored_fields_memory_in_bytes": 0,
  270. "term_vectors_memory_in_bytes": 0,
  271. "norms_memory_in_bytes": 0,
  272. "points_memory_in_bytes": 0,
  273. "doc_values_memory_in_bytes": 0,
  274. "index_writer_memory_in_bytes": 0,
  275. "version_map_memory_in_bytes": 0,
  276. "fixed_bit_set_memory_in_bytes": 0,
  277. "max_unsafe_auto_id_timestamp": -1,
  278. "remote_store" : {
  279. "upload" : {
  280. "total_upload_size" : {
  281. "started_bytes" : 152419,
  282. "succeeded_bytes" : 152419,
  283. "failed_bytes" : 0
  284. },
  285. "refresh_size_lag" : {
  286. "total_bytes" : 0,
  287. "max_bytes" : 0
  288. },
  289. "max_refresh_time_lag_in_millis" : 0,
  290. "total_time_spent_in_millis" : 516
  291. },
  292. "download" : {
  293. "total_download_size" : {
  294. "started_bytes" : 0,
  295. "succeeded_bytes" : 0,
  296. "failed_bytes" : 0
  297. },
  298. "total_time_spent_in_millis" : 0
  299. }
  300. },
  301. "file_sizes": {}
  302. },
  303. "translog": {
  304. "operations": 0,
  305. "size_in_bytes": 55,
  306. "uncommitted_operations": 0,
  307. "uncommitted_size_in_bytes": 55,
  308. "earliest_last_modified_age": 142622215,
  309. "remote_store" : {
  310. "upload" : {
  311. "total_uploads" : {
  312. "started" : 57,
  313. "failed" : 0,
  314. "succeeded" : 57
  315. },
  316. "total_upload_size" : {
  317. "started_bytes" : 16830,
  318. "failed_bytes" : 0,
  319. "succeeded_bytes" : 16830
  320. }
  321. }
  322. }
  323. },
  324. "request_cache": {
  325. "memory_size_in_bytes": 0,
  326. "evictions": 0,
  327. "hit_count": 0,
  328. "miss_count": 0
  329. },
  330. "recovery": {
  331. "current_as_source": 0,
  332. "current_as_target": 0,
  333. "throttle_time_in_millis": 0
  334. }
  335. }
  336. },
  337. "indices": {
  338. "testindex": {
  339. "uuid": "0SXXSpe9Rp-FpxXXWLOD8Q",
  340. "primaries": {
  341. "docs": {
  342. "count": 4,
  343. "deleted": 0
  344. },
  345. "store": {
  346. "size_in_bytes": 15531,
  347. "reserved_in_bytes": 0
  348. },
  349. "indexing": {
  350. "index_total": 4,
  351. "index_time_in_millis": 10,
  352. "index_current": 0,
  353. "index_failed": 0,
  354. "delete_total": 0,
  355. "delete_time_in_millis": 0,
  356. "delete_current": 0,
  357. "noop_update_total": 0,
  358. "is_throttled": false,
  359. "throttle_time_in_millis": 0
  360. },
  361. "get": {
  362. "total": 0,
  363. "time_in_millis": 0,
  364. "exists_total": 0,
  365. "exists_time_in_millis": 0,
  366. "missing_total": 0,
  367. "missing_time_in_millis": 0,
  368. "current": 0
  369. },
  370. "search": {
  371. "open_contexts": 0,
  372. "query_total": 12,
  373. "query_time_in_millis": 11,
  374. "query_current": 0,
  375. "fetch_total": 12,
  376. "fetch_time_in_millis": 5,
  377. "fetch_current": 0,
  378. "scroll_total": 0,
  379. "scroll_time_in_millis": 0,
  380. "scroll_current": 0,
  381. "point_in_time_total": 0,
  382. "point_in_time_time_in_millis": 0,
  383. "point_in_time_current": 0,
  384. "suggest_total": 0,
  385. "suggest_time_in_millis": 0,
  386. "suggest_current": 0
  387. },
  388. "merges": {
  389. "current": 0,
  390. "current_docs": 0,
  391. "current_size_in_bytes": 0,
  392. "total": 0,
  393. "total_time_in_millis": 0,
  394. "total_docs": 0,
  395. "total_size_in_bytes": 0,
  396. "total_stopped_time_in_millis": 0,
  397. "total_throttled_time_in_millis": 0,
  398. "total_auto_throttle_in_bytes": 20971520
  399. },
  400. "refresh": {
  401. "total": 8,
  402. "total_time_in_millis": 58,
  403. "external_total": 7,
  404. "external_total_time_in_millis": 60,
  405. "listeners": 0
  406. },
  407. "flush": {
  408. "total": 1,
  409. "periodic": 1,
  410. "total_time_in_millis": 21
  411. },
  412. "warmer": {
  413. "current": 0,
  414. "total": 6,
  415. "total_time_in_millis": 0
  416. },
  417. "query_cache": {
  418. "memory_size_in_bytes": 0,
  419. "total_count": 0,
  420. "hit_count": 0,
  421. "miss_count": 0,
  422. "cache_size": 0,
  423. "cache_count": 0,
  424. "evictions": 0
  425. },
  426. "fielddata": {
  427. "memory_size_in_bytes": 0,
  428. "evictions": 0
  429. },
  430. "completion": {
  431. "size_in_bytes": 0
  432. },
  433. "segments": {
  434. "count": 4,
  435. "memory_in_bytes": 0,
  436. "terms_memory_in_bytes": 0,
  437. "stored_fields_memory_in_bytes": 0,
  438. "term_vectors_memory_in_bytes": 0,
  439. "norms_memory_in_bytes": 0,
  440. "points_memory_in_bytes": 0,
  441. "doc_values_memory_in_bytes": 0,
  442. "index_writer_memory_in_bytes": 0,
  443. "version_map_memory_in_bytes": 0,
  444. "fixed_bit_set_memory_in_bytes": 0,
  445. "max_unsafe_auto_id_timestamp": -1,
  446. "remote_store" : {
  447. "upload" : {
  448. "total_upload_size" : {
  449. "started_bytes" : 152419,
  450. "succeeded_bytes" : 152419,
  451. "failed_bytes" : 0
  452. },
  453. "refresh_size_lag" : {
  454. "total_bytes" : 0,
  455. "max_bytes" : 0
  456. },
  457. "max_refresh_time_lag_in_millis" : 0,
  458. "total_time_spent_in_millis" : 516
  459. },
  460. "download" : {
  461. "total_download_size" : {
  462. "started_bytes" : 0,
  463. "succeeded_bytes" : 0,
  464. "failed_bytes" : 0
  465. },
  466. "total_time_spent_in_millis" : 0
  467. }
  468. },
  469. "file_sizes": {}
  470. },
  471. "translog": {
  472. "operations": 0,
  473. "size_in_bytes": 55,
  474. "uncommitted_operations": 0,
  475. "uncommitted_size_in_bytes": 55,
  476. "earliest_last_modified_age": 142622215,
  477. "remote_store" : {
  478. "upload" : {
  479. "total_uploads" : {
  480. "started" : 57,
  481. "failed" : 0,
  482. "succeeded" : 57
  483. },
  484. "total_upload_size" : {
  485. "started_bytes" : 16830,
  486. "failed_bytes" : 0,
  487. "succeeded_bytes" : 16830
  488. }
  489. }
  490. }
  491. },
  492. "request_cache": {
  493. "memory_size_in_bytes": 0,
  494. "evictions": 0,
  495. "hit_count": 0,
  496. "miss_count": 0
  497. },
  498. "recovery": {
  499. "current_as_source": 0,
  500. "current_as_target": 0,
  501. "throttle_time_in_millis": 0
  502. }
  503. },
  504. "total": {
  505. "docs": {
  506. "count": 4,
  507. "deleted": 0
  508. },
  509. "store": {
  510. "size_in_bytes": 15531,
  511. "reserved_in_bytes": 0
  512. },
  513. "indexing": {
  514. "index_total": 4,
  515. "index_time_in_millis": 10,
  516. "index_current": 0,
  517. "index_failed": 0,
  518. "delete_total": 0,
  519. "delete_time_in_millis": 0,
  520. "delete_current": 0,
  521. "noop_update_total": 0,
  522. "is_throttled": false,
  523. "throttle_time_in_millis": 0
  524. },
  525. "get": {
  526. "total": 0,
  527. "time_in_millis": 0,
  528. "exists_total": 0,
  529. "exists_time_in_millis": 0,
  530. "missing_total": 0,
  531. "missing_time_in_millis": 0,
  532. "current": 0
  533. },
  534. "search": {
  535. "open_contexts": 0,
  536. "query_total": 12,
  537. "query_time_in_millis": 11,
  538. "query_current": 0,
  539. "fetch_total": 12,
  540. "fetch_time_in_millis": 5,
  541. "fetch_current": 0,
  542. "scroll_total": 0,
  543. "scroll_time_in_millis": 0,
  544. "scroll_current": 0,
  545. "point_in_time_total": 0,
  546. "point_in_time_time_in_millis": 0,
  547. "point_in_time_current": 0,
  548. "suggest_total": 0,
  549. "suggest_time_in_millis": 0,
  550. "suggest_current": 0
  551. },
  552. "merges": {
  553. "current": 0,
  554. "current_docs": 0,
  555. "current_size_in_bytes": 0,
  556. "total": 0,
  557. "total_time_in_millis": 0,
  558. "total_docs": 0,
  559. "total_size_in_bytes": 0,
  560. "total_stopped_time_in_millis": 0,
  561. "total_throttled_time_in_millis": 0,
  562. "total_auto_throttle_in_bytes": 20971520
  563. },
  564. "refresh": {
  565. "total": 8,
  566. "total_time_in_millis": 58,
  567. "external_total": 7,
  568. "external_total_time_in_millis": 60,
  569. "listeners": 0
  570. },
  571. "flush": {
  572. "total": 1,
  573. "periodic": 1,
  574. "total_time_in_millis": 21
  575. },
  576. "warmer": {
  577. "current": 0,
  578. "total": 6,
  579. "total_time_in_millis": 0
  580. },
  581. "query_cache": {
  582. "memory_size_in_bytes": 0,
  583. "total_count": 0,
  584. "hit_count": 0,
  585. "miss_count": 0,
  586. "cache_size": 0,
  587. "cache_count": 0,
  588. "evictions": 0
  589. },
  590. "fielddata": {
  591. "memory_size_in_bytes": 0,
  592. "evictions": 0
  593. },
  594. "completion": {
  595. "size_in_bytes": 0
  596. },
  597. "segments": {
  598. "count": 4,
  599. "memory_in_bytes": 0,
  600. "terms_memory_in_bytes": 0,
  601. "stored_fields_memory_in_bytes": 0,
  602. "term_vectors_memory_in_bytes": 0,
  603. "norms_memory_in_bytes": 0,
  604. "points_memory_in_bytes": 0,
  605. "doc_values_memory_in_bytes": 0,
  606. "index_writer_memory_in_bytes": 0,
  607. "version_map_memory_in_bytes": 0,
  608. "fixed_bit_set_memory_in_bytes": 0,
  609. "max_unsafe_auto_id_timestamp": -1,
  610. "remote_store" : {
  611. "upload" : {
  612. "total_upload_size" : {
  613. "started_bytes" : 152419,
  614. "succeeded_bytes" : 152419,
  615. "failed_bytes" : 0
  616. },
  617. "refresh_size_lag" : {
  618. "total_bytes" : 0,
  619. "max_bytes" : 0
  620. },
  621. "max_refresh_time_lag_in_millis" : 0,
  622. "total_time_spent_in_millis" : 516
  623. },
  624. "download" : {
  625. "total_download_size" : {
  626. "started_bytes" : 0,
  627. "succeeded_bytes" : 0,
  628. "failed_bytes" : 0
  629. },
  630. "total_time_spent_in_millis" : 0
  631. }
  632. },
  633. "file_sizes": {}
  634. },
  635. "translog": {
  636. "operations": 0,
  637. "size_in_bytes": 55,
  638. "uncommitted_operations": 0,
  639. "uncommitted_size_in_bytes": 55,
  640. "earliest_last_modified_age": 142622215,
  641. "remote_store" : {
  642. "upload" : {
  643. "total_uploads" : {
  644. "started" : 57,
  645. "failed" : 0,
  646. "succeeded" : 57
  647. },
  648. "total_upload_size" : {
  649. "started_bytes" : 16830,
  650. "failed_bytes" : 0,
  651. "succeeded_bytes" : 16830
  652. }
  653. }
  654. }
  655. },
  656. "request_cache": {
  657. "memory_size_in_bytes": 0,
  658. "evictions": 0,
  659. "hit_count": 0,
  660. "miss_count": 0
  661. },
  662. "recovery": {
  663. "current_as_source": 0,
  664. "current_as_target": 0,
  665. "throttle_time_in_millis": 0
  666. }
  667. }
  668. }
  669. }
  670. }

Example request: Comma-separated list of indexes

  1. GET /testindex1,testindex2/_stats

copy

Example request: Wildcard expression

  1. GET /testindex*/_stats

copy

Example request: Specific stats

  1. GET /testindex/_stats/refresh,flush

copy

Example request: Expand wildcards

  1. GET /testindex*/_stats?expand_wildcards=open,hidden

copy

Example request: Shard-level statistics

  1. GET /testindex/_stats?level=shards

copy

Starting in OpenSearch 2.10, concurrent segment search allows each shard-level request to search segments in parallel during the query phase. If you enable the experimental concurrent segment search feature flag, the Index Stats API response will contain several additional fields with statistics about slices (units of work executed by a thread). These fields will be provided whether or not the cluster and index settings for concurrent segment search are enabled. For more information about slices, see Concurrent segment search.

The following table provides information about the added response fields.

Response fieldDescription
search.concurrent_avg_slice_countThe average slice count of all search requests. This is computed as the total slice count divided by the total number of concurrent search requests.
search.concurrent_query_totalThe total number of query operations that use concurrent segment search.
search.concurrent_query_time_in_millisThe total amount of time taken by all query operations that use concurrent segment search, in milliseconds.
search.concurrent_query_currentThe number of currently running query operations that use concurrent segment search.