![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ES
没有一个能用的名字
这个作者很懒,什么都没留下…
展开
-
ES 排序
排序GET /roc_test_index/_search{ "query":{ "match_all":{} }, "_sort":{ "createtime":"desc" }}随机排序GET /roc_test_index/_search{ "query":{ "match_all":{} }, "sort": { "_s...原创 2020-03-03 13:47:41 · 179 阅读 · 0 评论 -
ES 分页
分页 from : 下标 , size : 条数GET /roc_test_index/_search{ "query":{ "match_all":{} }, "from":0, "size":10}原创 2020-03-03 13:46:34 · 131 阅读 · 0 评论 -
ES 指定查询返回结果
ES 指定查询返回结果指定查询结果展现的字段// 指定单个GET /roc_test_index/_search{ "query":{ "match_all":{} }, "_source":"name"}// 指定多个GET /roc_test_index/_search{ "query":{ "match_all":{} }, "_sou...原创 2020-03-03 13:38:31 · 1267 阅读 · 0 评论 -
ES 简单查询
ES 简单查询1 : 查询所有GET /roc_test_index/_search{ "query":{ "match_all":{} }}2 : 模糊查询GET /roc_test_index/search{ "query":{ "match":{ "name":"木" } }}3 : 中文短语模糊查询 , 只会匹配到包含 "木头"的数...原创 2020-03-03 13:37:58 · 184 阅读 · 0 评论 -
ES 创建索引
1 : 查看 es 的一些基本状态检查Elasticsearch是否正在运行 : curl http://localhost:9200/集群健康 : GET “localhost:9200/_cat/health?v”查看全部索引 : GET “localhost:9200/_cat/indices?v”2 : 创建索引例如创建索引名称 roc_test_index , 索引 typ...原创 2020-03-03 11:36:31 · 399 阅读 · 0 评论 -
ES 设置 mapping
ES 设置 mapping接着上片说的创建索引 , 接下来需要做的是设置 mapping . 就相当于数据库添加了表之后 , 需要设计各个字段的数据格式创建 index 之后 , ES 会默认创建 mapping .查看 mappingGET /roc_test_index/_mapping返回结果{ "roc_test_index": { "mappings": { ...原创 2020-03-03 12:21:52 · 558 阅读 · 0 评论 -
ES学习道路,写在前面
ES 学习之路 , 写在前面整理自己学习和使用 ES 的一些心得和一些特殊业务下 ES 的使用首先安装啥的我没有特别花时间 , 只是简单的用 docker 搭建了一套测试的 . 有兴趣的可以看看 ES 的安装我就不专门找了 .Docker 方式 :// 启动 ESdocker run -d --name elasticsearch -p 9200:9200 -p 9300:9300 -...原创 2020-03-03 11:17:41 · 82 阅读 · 0 评论