本篇内容介绍了“ElasticSearch怎么查看、删除以及创建索引”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!
成都创新互联是一家专注于成都做网站、网站设计与策划设计,肇庆网站建设哪家好?成都创新互联做网站,专注于网站建设十余年,网设计领域的专业建站公司;建站业务涵盖:肇庆等地区。肇庆做网站价格咨询: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" ] } 结果: { "_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 查询结果: { "_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" ] } 结果: { "_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 结果: { "found": true, "_index": "ecommerce", "_type": "produce", "_id": "1", "_version": 9, "result": "deleted", "_shards": { "total": 2, "successful": 2, "failed": 0 } }
“ElasticSearch怎么查看、删除以及创建索引”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注创新互联网站,小编将为大家输出更多高质量的实用文章!
本文标题:ElasticSearch怎么查看、删除以及创建索引
网站链接:https://www.cdcxhl.com/article38/gsidsp.html
成都网站建设公司_创新互联,为您提供商城网站、面包屑导航、小程序开发、移动网站建设、手机网站建设、网站导航
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联