本篇內(nèi)容介紹了“ElasticSearch怎么查看、刪除以及創(chuàng)建索引”的有關(guān)知識(shí),在實(shí)際案例的操作過(guò)程中,不少人都會(huì)遇到這樣的困境,接下來(lái)就讓小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細(xì)閱讀,能夠?qū)W有所成!
成都創(chuàng)新互聯(lián)是一家專注于成都做網(wǎng)站、網(wǎng)站設(shè)計(jì)與策劃設(shè)計(jì),肇慶網(wǎng)站建設(shè)哪家好?成都創(chuàng)新互聯(lián)做網(wǎng)站,專注于網(wǎng)站建設(shè)十余年,網(wǎng)設(shè)計(jì)領(lǐng)域的專業(yè)建站公司;建站業(yè)務(wù)涵蓋:肇慶等地區(qū)。肇慶做網(wǎng)站價(jià)格咨詢:028-86922220
GET http://{{es-host}}/_cat/health?v
epoch timestamp cluster status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent 1565356074 13:07:54 elasticsearch green 3 3 10 5 0 0 0 0 - 100.0%
GET http://{{es-host}}/_cat/indices?v
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size green open ecommerce YO4DgZuSTe23piO6hjF--w 5 1 3 0 34.2kb 17.1kb
GET http://{{es-host}}/_cat/nodes?v
ip heap.percent ram.percent cpu load_1m load_5m load_15m node.role master name 192.168.100.102 35 95 0 0.04 0.04 0.05 mdi - es-node3 192.168.100.102 23 95 0 0.04 0.04 0.05 mdi * es-node1 192.168.100.102 35 95 0 0.04 0.04 0.05 mdi - es-node2
PUT http://{{es-host}}/test-index?pretty
DELETE http://{{es-host}}/test-index
(1)、
PUT http://{{es-host}}/ecommerce/produce/1 { "name":"gaolujie yagao", "desc":"gaoxiao meibai", "price":30, "producer":"gaolujie producer", "tags":[ "meibai","fangzhu" ] } 結(jié)果: { "_index": "ecommerce", "_type": "produce", "_id": "1", "_version": 10, "result": "created", "_shards": { "total": 2, "successful": 2, "failed": 0 }, "created": true }
(2)、
PUT http://{{es-host}}/ecommerce/produce/2 { "name":"jiajieshi yagao", "desc":"youxiao fangzhu", "price":25, "producer":"jiajieshi producer", "tags":[ "fangzhu" ] }
(3)、
PUT http://{{es-host}}/ecommerce/produce/3 { "name":"zhonghua yagao", "desc":"caoben zhiwu", "price":40, "producer":"zhonghua producer", "tags":[ "qingxin" ] }
GET http://{{es-host}}/ecommerce/produce/1 查詢結(jié)果: { "_index": "ecommerce", "_type": "produce", "_id": "1", "_version": 7, "found": true, "_source": { "name": "gaolujie yagao", "desc": "gaoxiao meibai", "price": 30, "producer": "gaolujie producer", "tags": [ "meibai", "fangzhu" ] } }
POST http://{{es-host}}/ecommerce/produce/1/_update { "doc":{ "price":30 } }
PUT http://{{es-host}}/ecommerce/produce/1 { "name":"gaolujie yagao1", "desc":"gaoxiao meibai", "price":30, "producer":"gaolujie producer", "tags":[ "meibai","fangzhu" ] } 結(jié)果: { "_index": "ecommerce", "_type": "produce", "_id": "1", "_version": 8, "result": "updated", "_shards": { "total": 2, "successful": 2, "failed": 0 }, "created": false }
DELETE http://{{es-host}}/ecommerce/produce/1 結(jié)果: { "found": true, "_index": "ecommerce", "_type": "produce", "_id": "1", "_version": 9, "result": "deleted", "_shards": { "total": 2, "successful": 2, "failed": 0 } }
“ElasticSearch怎么查看、刪除以及創(chuàng)建索引”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識(shí)可以關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實(shí)用文章!