使用kibana客户端工具操作ElasticSearch(增删改查一)
生活随笔
收集整理的這篇文章主要介紹了
使用kibana客户端工具操作ElasticSearch(增删改查一)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
(因為ElasticSearch是restful請求所以? get?post?put?delete這四種常見的請求)
put添加數據
get獲取數據?
#創建索引庫lib 并且對索引庫做了分片和備份(由于這里是單機的ElasticSearch備份0) PUT /lib/ {"settings": {"index": {"number_of_shards":3,"number_of_replicas":0}} }#不對創建的索引庫設置,有沒有默認值,當然有我們可以通過get請求查看索引庫的設置 PUT lib2GET /lib/_settingsGET /lib2/_settingsGET /_all/_settingsPUT /lib/user/1 {"first_name":"Jane","last_name":"Smith","age":32,"about":"I like to collect rock albums","interests":["music"] }GET /lib/_settings
?
GET /lib2/_settings
我們沒有為lib2設置分片和備份,默認5個分片,1份備份
?
?
GET /_all/_settings? 查看所有索引庫的設置
{"blog" : {"settings" : {"index" : {"creation_date" : "1583329166184","number_of_shards" : "5","number_of_replicas" : "1","uuid" : "81MUBVg2QIuEPfx4EUgewA","version" : {"created" : "6080699"},"provided_name" : "blog"}}},".kibana_task_manager" : {"settings" : {"index" : {"number_of_shards" : "1","auto_expand_replicas" : "0-1","provided_name" : ".kibana_task_manager","creation_date" : "1577929363433","number_of_replicas" : "0","uuid" : "HBrqPnnZTK2u9uR3kufo-Q","version" : {"created" : "6080699"}}}},"lib2" : {"settings" : {"index" : {"creation_date" : "1583416309156","number_of_shards" : "5","number_of_replicas" : "1","uuid" : "9Ta0EnpkQwya8BVgnzLxCQ","version" : {"created" : "6080699"},"provided_name" : "lib2"}}},"blog1" : {"settings" : {"index" : {"creation_date" : "1583330667393","number_of_shards" : "5","number_of_replicas" : "1","uuid" : "GbICx3zAQfGr1y9FdD4GKA","version" : {"created" : "6080699"},"provided_name" : "blog1"}}},"lib" : {"settings" : {"index" : {"creation_date" : "1583416264854","number_of_shards" : "3","number_of_replicas" : "0","uuid" : "xBd6M9IpQ7yJiaSby7mIJQ","version" : {"created" : "6080699"},"provided_name" : "lib"}}},".kibana_1" : {"settings" : {"index" : {"number_of_shards" : "1","auto_expand_replicas" : "0-1","provided_name" : ".kibana_1","creation_date" : "1577929369509","number_of_replicas" : "0","uuid" : "J0ZmfCI3TUidIX_i2qvTtQ","version" : {"created" : "6080699"}}}} }?
?
?
?
?
總結
以上是生活随笔為你收集整理的使用kibana客户端工具操作ElasticSearch(增删改查一)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 日常生活小技巧 -- vmware wo
- 下一篇: 日常生活 -- 开博一周年