Elasticsearch 知识点
2024-09-09 12:03:39
- Elasticsearch 知识点
table th:first-of-type {
width: 200px;
}
table th:nth-of-type(2) {
}
功能 | curl命令 |
---|---|
运行 Elasticsearch | ./bin/elasticsearch |
查看当前节点的所有 Index | curl -X GET 'http://localhost:9200/_cat/indices?v' |
新建 Index | curl -X PUT 'localhost:9200/weather' |
删除 Index | curl -X DELETE 'localhost:9200/weather' |
新增或更新记录 | curl -X PUT 'localhost:9200/accounts/person/1' -d ' {"user": "张三", "title": "工程师", "desc": "数据库管理"}' |
查询记录 | curl 'localhost:9200/accounts/person/1?pretty=true' |
删除记录 | curl -X DELETE 'localhost:9200/accounts/person/1' |
返回所有记录 | curl 'localhost:9200/accounts/person/_search' |
match查询(from字段,指定位移;size字段,指定返回结果条数,默认10条) | curl 'localhost:9200/accounts/person/_search' -d '{"query" : { "match" : { "desc" : "管理" }}", "from": 1, "size": 20}' |
如果有多个搜索关键字, Elastic 认为它们是or关系。 此条命令搜索的是软件 or 系统。 | curl 'localhost:9200/accounts/person/_search' -d '{ "query" : { "match" : { "desc" : "软件 系统" }}}' |
执行多个关键词的and搜索,必须使用布尔查询 | curl 'localhost:9200/accounts/person/_search' -d ' { "query": { "bool": { "must": [ { "match": { "desc": "软件" } }, { "match": { "desc": "系统" } } ] } } }' |
最新文章
- TI PDK3.0 qt 交叉编译环境设置
- Java中单例
- [USACO07MAR]黄金阵容均衡Gold Balanced L…(洛谷 1360)
- Python基本数据类型之int 、 float
- Cygwin下载,安装教程
- [Gauss]POJ3185 The Water Bowls
- HDU 2653 - Waiting ten thousand years for Love
- 查看MDB格式文件数据表
- OpenStack使用Bosh部署CloudFoundry(一)—准备OpenStack环境
- hdu 4039 The Social Network
- 探讨C++ 变量生命周期、栈分配方式、类内存布局、Debug和Release程序的区别
- 手工场景--controller--场景设计、场景监控、运行场景
- 修改jsp默认编码
- zookeeper分布式部署方案
- python笔记---@classmethod @staticmethod
- 为iframe添加onclick事件
- small_trick_on_IT/PC
- Python3学习笔记18-访问限制
- 测试覆盖率工具:EclEmma
- python处理中文
热门文章
- c#将Excel数据导入到数据库的实现代码
- 查询(sqlSuger)
- 上传xslx文件设置accept的MIME 类型
- JavaScript学习总结(十一)——Object类详解
- 062——VUE中vue-router之命名视图的实例
- httpclient http状态管理
- python自动化运维之路06
- VS2013中的快捷键大全
- 未能加载文件或程序集“Microsoft.Office.Interop.Excel
- 2018-2019-2 网络对抗技术 20165202 Exp2 后门原理与实践