9. polidog に elasticsearch を教える - 2016-06-04 Powered by Rabbit 2.1.9
Index の確認
$ curl localhost:9200/_cat/indices?v
$ curator --host localhost show indices --all-indices
10. polidog に elasticsearch を教える - 2016-06-04 Powered by Rabbit 2.1.9
logstash 形式の index
hoge-YYYY.MM.DD 形式の
index
✓
open は hoge-YYYY.MM.DD
全てが検索の対象となる
検索の対象から外すには
close✓
delete✓
✓
✓
11. polidog に elasticsearch を教える - 2016-06-04 Powered by Rabbit 2.1.9
close index
logstash 形式の index (hoge-
YYYY.MM.DD) で運用すると、古
い index を検索対象から外したく
なる。
$ curator --host localhost
close indices
--prefix dstat
--older-than 7
--time-unit days
--timestring '%Y.%m.%d'
12. polidog に elasticsearch を教える - 2016-06-04 Powered by Rabbit 2.1.9
delete index
logstash 形式の index (hoge-
YYYY.MM.DD) で運用すると、古
い index を検索対象から外したく
なる。
$ curator --host localhost
deleteg indices
--prefix dstat
--older-than 7
--time-unit days
--timestring '%Y.%m.%d'
13. polidog に elasticsearch を教える - 2016-06-04 Powered by Rabbit 2.1.9
Template
ある index における filed と
type の mapping を指定する
もの
各 field の type の指定がなけれ
ば、文字列として扱われる
✓
✓