1.curl192.168.106.58:9200/_cat/health?v 集群健康查看

epoch      timestamp cluster       status node.total node.data shards pri relo init unassign 
1400639131 10:25:31  elasticsearch green           1         1     18  18    0    0        0

2. curl 192.168.106.58:9200/_cat/nodes?v 节点健康查看

host    ip             heap.percent ram.percent load node.role master name   
wendah1 192.168.106.58           55          59 6.65 d         *      Primus

3.curl 192.168.106.58:9200/_cat/indices?v  列出集群索引

health index        pri rep docs.count docs.deleted store.size pri.store.size 
green  autoindex      6   0    1800000            0    854.4mb        854.4mb 
green  autoindex111   6   0    1400000            0    864.4mb        864.4mb 
green  product        6   0    3000000            0      1.2gb          1.2gb

4.curl -XPUT 192.168.106.58:9200/customer?pretty 创建customer索引 pretty表示打印json响应

{
  "acknowledged" : true
}

5.curl -XPUT 192.168.106.58:9200/customer/external/1?pretty '-d { "name":"JOhn Doe"}' 索引数据

6.curl -XGET 192.168.106.58:9200/customer/external/1?pretty get查询数据

7. curl -XDELETE 192.168.106.58:9200/customer?pretty 删除索引

8.curl
-XPUT 192.168.106.58:9200/customer/external/1?pretty '-d { "name":"JOhn Doe"}' 通过id更新索引数据

9.curl
-XPOST 192.168.106.58:9200/customer/external?pretty '-d { "name":"JOhn Doe"}' 出入索引数据随机id

10.curl
-XDELETE 192.168.106.58:9200/customer/external/2?pretty 通过id删除

11.curl -XDELETE '192.168.106.58:9200/customer/external/_query?pretty'
-d '
{
  "query": { "match": { "name": "John" } }
}' 通过查询删除

12.curl -XPOST '192.168.106.58:9200/customer/external/_bulk?pretty' -d '
{"index":{"_id":"1"}}
{"name": "John Doe" }
{"index":{"_id":"2"}}
{"name": "Jane Doe" }
'
curl -XPOST '192.168.106.58:9200/customer/external/_bulk?pretty' -d '
{"update":{"_id":"1"}}
{"doc": { "name": "John Doe becomes Jane Doe" } }
{"delete":{"_id":"2"}}
'

13 curl -XPOST '192.168.106.58:9200/bank/account/_bulk?pretty' --data-binary @accounts.json 读文件批量索引

批量索引操作

14 curl -XPOST '192.168.106.58:9200/bank/_search?pretty' -d '
{
  "query": {
    "bool": {
      "must": [
        { "match": { "address": "mill" } },
        { "match": { "address": "lane" } }
      ]
    }
  }
}' query DSL(后期详细介绍)

15 curl 192.168.106.58:9200/_nodes/process?pretty 查看进程信息 包括打开文件数,是否锁定内存等

索引相关

URL 说明
/index/_search 不解释
/_aliases 获取或操作索引的别名
/index/  
/index/type/ 创建或操作类型
/index/_mapping 创建或操作mapping
/index/_settings 创建或操作设置(number_of_shards是不可更改的)
/index/_open 打开被关闭的索引
/index/_close 关闭索引
/index/_refresh 刷新索引(使新加内容对搜索可见)
/index/_flush

刷新索引

将变动提交到lucene索引文件中

并清空elasticsearch的transaction log,

与refresh的区别需要继续研究

/index/_optimize 优化segement,个人认为主要是对segement进行合并
/index/_status 获得索引的状态信息
/index/_segments 获得索引的segments的状态信息
/index/_explain 不执行实际搜索,而返回解释信息
/index/_analyze 不执行实际搜索,根据输入的参数进行文本分析
/index/type/id 操作指定文档,不解释
/index/type/id/_create 创建一个文档,如果该文件已经存在,则返回失败
/index/type/id/_update 更新一个文件,如果改文件不存在,则返回失败
   

Distributed

URL 说明
/_cluster/nodes 获得集群中的节点列表和信息
/_cluster/health 获得集群信息
/_cluster/state 获得集群里的所有信息(集群信息、节点信息、mapping信息等)

Nodes

URL 说明
/_nodes/process 我主要看file descriptor 这个信息
/_nodes/process/stats 统计信息(内存、CPU能)
/_nodes/jvm 获得各节点的虚拟机统计和配置信息
/_nodes/jvm/stats 更详细的虚拟机信息
/_nodes/http 获得各个节点的http信息(如ip地址)
/_nodes/http/stats 获得各个节点处理http请求的统计情况
/_nodes/thread_pool

获得各种类型的线程池

(elasticsearch分别对不同的操作提供不同的线程池)的配置信息

/_nodes/thread_pool/stats 获得各种类型的线程池的统计信息
   

以上这些操作和可以通过如

/_nodes/${nodeId}/jvm/stats

/_nodes/${nodeip}/jvm/stats

/_nodes/${nodeattribute}/jvm/stats

的形式针对指定节点的操作。

其他

/_template/templateName 创建索引配置模板,比如默认的mapping

/_percolator/indexName/percolatorName 创建percolator(这个词怎么翻译成中文,是个问题)

/index/type/_percolate/ 对payload中指定的文档进行”反

结束语

将url列出,个人觉得,对把握整个elasticsearch的概念和系统结构很有帮助,下一步需要针对重点内容(_search必然是重点内容)逐个研究。

参考文献:http://wwwlouxuemingcom.blog.163.com/blog/static/209747822013287138100/

ElasticSearch的各种服务的URL的更多相关文章

  1. Dynamic CRM 2015学习笔记(4)修改开发人员资源(发现服务、组织服务和组织数据服务)url地址及组织名

    在azure vm上安装了CRM 2015后 Dynamic CRM 2015学习笔记(1)Azure 上安装 CRM 2015, 发现了一个问题,那就是在设置 ->自定义项 –> 开发人 ...

  2. 搭建RESTful API 之 实现WSGI服务的URL映射

    javarestfull 搭建参考 http://blog.csdn.net/hejias/article/details/47424511 问题引出:对于一个稍具规模的网站来说,实现的功能不可能通过 ...

  3. Nginx笔记:支持对用户提交URL和服务的URL不一致时,保持对POST提交的支持

    用户访问的URL和服务的URL不一致,需要对URL修改,同时使用的是POST提交方式 location ~* ^/portalproxy/([-]*)/portal$ { #rewrite '^/po ...

  4. Windows10 搭建 ElasticSearch 集群服务

    一.前言 集群的搭建需要多台机器,之前我使用 ubuntu 16.04 搭建过 hadoop 的单机模式和分布式模式,这个今后会写,今天先写一篇使用 < Windows10 搭建 Elastic ...

  5. 全文检索方案Elasticsearch【Python-Django 服务端开发】

    更详细请看 https://www.elastic.co/cn/ 1. 全文检索和搜索引擎原理 商品搜索需求 当用户在搜索框输入商品关键字后,我们要为用户提供相关的商品搜索结果. 商品搜索实现 可以选 ...

  6. 从零搭建Spring Boot脚手架(7):Elasticsearch应该独立服务

    1. Spring Data Elasticsearch Spring Data Elasticsearch是Spring Data项目的子项目,提供了Elasticsearch与Spring的集成. ...

  7. ElasticSearch作为Windows服务启动

           由于公司服务器用的Windows服务器,所以你懂得…… 直接下载elasticsearch中文发行版.下载地址是:https://github.com/medcl/elasticsear ...

  8. ES 05 - 通过Kibana管理Elasticsearch集群服务

    目录 1 检查集群的健康状况 2 查看集群中的节点个数 3 查看集群中的索引 4 简单的索引操作 4.1 创建索引 4.2 删除索引 在本篇文章之前, 需要完成: ① 启动Elasticsearch服 ...

  9. Elasticsearch 注册windows服务后,服务启动失败,意外终止

    直接双击elasticsearch.bat可以成功启动,注册成服务后就启动失败 从网上查找问题,发现是jdk版本的问题,用ES自带的jdk就可以启动成功. 默认ES会先找JAVA_HOME环境变量,如 ...

随机推荐

  1. MMORPG大型游戏设计与开发(客户端架构 part1 of vegine)

    重写有些核心接口的时候,其实遇到了许多的问题,甚至一度的想过要放弃,但是最终还是坚持了下来.在客户端提供的这些接口中,可以清晰的看到客户端所依赖的各种模块的支持,以及各自之间的一些关联.下面只是介绍了 ...

  2. LeetCode 笔记系列六 Reverse Nodes in k-Group [学习如何逆转一个单链表]

    题目:Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. ...

  3. ExtJs4 笔记(14) layout 布局

    作者:李盼(Lipan)出处:[Lipan] (http://www.cnblogs.com/lipan/)版权声明:本文的版权归作者与博客园共有.转载时须注明本文的详细链接,否则作者将保留追究其法律 ...

  4. Jquery:小知识;

    Jquery:小知识: jQuery学习笔记(二):this相关问题及选择器   上一节的遗留问题,关于this的相关问题,先来解决一下. this的相关问题 this指代的是什么 这个应该是比较好理 ...

  5. 2016年秋季的我,work with hololens

  6. 在VMware Workstation上安装CentOS6.5系统步

    在VMware Workstation上安装CentOS6.5系统步骤 听语音 | 浏览:147 | 更新:2016-07-28 15:45 | 标签:安装 虚拟机 CENTOS 1 2 3 4 5 ...

  7. Xcode 快捷键

    1.commmand +shift +k ,隐藏模拟器键盘,用户可以在真实键盘输入到模拟屏幕上.

  8. python实现一个图灵机器人

    这标题就是个噱头...其实用的别人的接口,就是这货. 下面是代码: # -*- coding: utf-8 -*- import urllib,urllib2 import sys import js ...

  9. 解决ssh-connect-to-host-github-com-port-22-connection-timed-out

    PC:~$ ssh git@github.com ssh: connect to host github.com port 22: Connection timed out 解决办法:(linux下) ...

  10. 黑暗圣经---物业公司CTO/CEO改如何给老板推荐物业信息化产品

    多年前一次偶然的机会进入到物业信息化行业,在这个过程中认识很多奋战在物业一线的技术大牛.很多时候都会介绍一些朋友给我认识一下,帮我推荐一下我们闻风多奇的物业管理平台.很多朋友看完我们的系统之后都会很开 ...