LoginSignup
9

More than 5 years have passed since last update.

Elasticsearchのインデックスサイズなどを確認する方法

Posted at

Indices Stats(公式ドキュメント)

以下に、Senseを使う方法とターミナルを使う方法を併記します。
Senseで確認すると整形した状態で出力されるので確認が楽です。

全体の統計情報を見る

Sense

GET _stats

ターミナル

$ curl localhost:9200/_stats

特定のインデックスの統計情報を見る

Sense

GET my_index/_stats

ターミナル

$ curl localhost:9200/my_index/_stats

複数のインデックスの統計情報を見る

Sense

GET my_index1,my_index2/_stats

ターミナル

$ curl localhost:9200/my_index1,my_index2/_stats

インデックスサイズを見る

Sense

GET my_index/_stats/store

ターミナル

$ curl localhost:9200/my_index/_stats/store

indexingの情報を見る

Sense

GET my_index/_stats/indexing

ターミナル

$ curl localhost:9200/my_index/_stats/indexing

document_typeを指定すると詳しく見れる

例えばtype=facilityとtype=job_offerがある場合

Sense

GET my_index/_stats/indexing?types=facility
GET my_index/_stats/indexing?types=job_offer

ターミナル

$ curl localhost:9200/my_index/_stats/indexing?types=facility
$ curl localhost:9200/my_index/_stats/indexing?types=job_offer

document_typeをカンマで区切ると複数のタイプを並べて見れる

Sense

GET my_index/_stats/indexing?types=facility,job_offer

ターミナル

$ curl localhost:9200/my_index/_stats/indexing?types=facility,job_offer

さいごに

今回はParent-Child Relationshipを使っておりParentとChildそれぞれのインデックスサイズ(store)を確認したかったのですが、どうやらそれはできない模様でした。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9