The REST API

Cluster Health ( http://localhost:9200/

curl -X GET "localhost:9200/_cat/health?v"

List Nodes

curl -X GET "localhost:9200/_cat/nodes?v"

List All Indices

curl -X GET "localhost:9200/_cat/indices?v"

Create an Index

使用PUT谓词创建一个名为 customer 的索引

curl -X PUT "localhost:9200/customer?pretty"

再次查看索引:

curl -X GET "localhost:9200/_cat/indices?v"

Index and Query a Document

curl -X PUT "localhost:9200/customer/_doc/1?pretty" -H 'Content-Type: application/json' -d'
{
"name": "John Doe"
}
'

查询文档:

curl -X GET "localhost:9200/customer/_doc/1?pretty"

Delete an Index

使用谓语动词 DELETE 删除一个索引

curl -X DELETE "localhost:9200/customer?pretty"

再次查看索引:

curl -X GET "localhost:9200/_cat/indices?v"

Elasticsearch 入门 - Exploring Your Cluster的更多相关文章

  1. ElasticSearch入门-搜索如此简单

    搜索引擎我也不是很熟悉,但是数据库还是比较了解.可以把搜索理解为数据库的like功能的替代品.因为like有以下几点不足: 第一.like的效率不行,在使用like时,一般都用不到索引,除非使用前缀匹 ...

  2. 《读书报告 -- Elasticsearch入门 》-- 安装以及简单使用(1)

    <读书报告 – Elasticsearch入门 > 第一章 Elasticsearch入门 Elasticsearch是一个实时的分布式搜索和分析引擎,使得人们可以在一定规模上和一定速度上 ...

  3. ElasticSearch入门 附.Net Core例子

    1.什么是ElasticSearch? Elasticsearch是基于Lucene的搜索引擎.它提供了一个分布式,支持多租户的全文搜索引擎,它具有HTTP Web界面和无模式JSON文档. Elas ...

  4. 全文搜索引擎Elasticsearch入门实践

    全文搜索引擎Elasticsearch入门实践 感谢阮一峰的网络日志全文搜索引擎 Elasticsearch 入门教程 安装 首先需要依赖Java环境.Elasticsearch官网https://w ...

  5. Elasticsearch Elasticsearch入门指导

    Elasticsearch入门指导 By:授客 QQ:1033553122 1. 开启elasticsearch服务器 1 2. 基本概念 2 <1> 集群(Cluster) 2 < ...

  6. 全文搜索引擎 Elasticsearch 入门

    1. 百科 ElasticSearch是一个基于Lucene的搜索服务器.它提供了一个分布式多用户能力的全文搜索引擎,基于RESTful web接口.Elasticsearch是用Java开发的,并作 ...

  7. ElasticSearch入门 第二篇:集群配置

    这是ElasticSearch 2.4 版本系列的第二篇: ElasticSearch入门 第一篇:Windows下安装ElasticSearch ElasticSearch入门 第二篇:集群配置 E ...

  8. ElasticSearch 入门总结

    ElasticSearch 入门 本篇为 ElasticSearch 入门学习总结笔记,课程视频地址:ElasticSearch 入门 一.ElasticSearch 简介 1.1.什么是Elasti ...

  9. Net Core ElasticSearch入门

    ElasticSearch入门 附.Net Core例子 https://www.cnblogs.com/CoderAyu/p/9564977.html 1.什么是ElasticSearch? Ela ...

随机推荐

  1. 为什么pthread_cond_wait须要传递mutex參数

    这是来自知乎的一个问题,由@吴志强提出,有意思的是,他看了大家的回答后,突然顿悟了,同一时候也发现有人答错了,于是乎.他自己回答了自己的问题. 我看完后.发现他分析的非常精彩,于是就记录在这.以下是他 ...

  2. Unity3D 射线指定层获取GameObject 注意 LayerMask

    这一篇是纯技术讨论,看过我前面文章的童鞋应该清楚,我的奔跑是靠鼠标响应的,鼠标点到哪就跑到哪,后来又有了界面,麻烦就来了,我的界面居然能点 穿.我不希望点界面的时候还能点到界面后面的地面上,角色傻不拉 ...

  3. DotNetBar.Bar菜单的使用

    DotNetBar.Bar菜单的使用 老帅     在C#中使用控件DevComponents.DotNetBar.Bar时,怎样设计菜单呢?      1.拖放生成一个菜单容器      拖放一个D ...

  4. java中与运算,或运算,异或运算,取反运算

      //与运算 &  规则 :都为1时才为1        System.out.println( 7 & 9);        /*         *  7二进制 0111     ...

  5. DNS隧道工具使用 不过其网络传输速度限制较大

    DNS隧道工具使用 http://www.freebuf.com/sectool/112076.html http://netsec.ccert.edu.cn/zhengming/2011/11/01 ...

  6. hdoj--1068--Girls and Boys(最大独立集)

    Girls and Boys Time Limit: 20000/10000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) ...

  7. 通过ip获取地址

    <?php /** * IP 地理位置查询类 * * @author 马秉尧 * @version 1.5 * @copyright 2005 CoolCode.CN */ class IpLo ...

  8. 基本的Mysql语句

    操作文件夹(库) 增 create database db1 charset utf8; 查 # 查看当前创建的数据库 show create database db1; # 查看所有的数据库 sho ...

  9. RMS:均方根值,RMSE:均方根误差,MSE:标准差

    .均方根值(RMS),有时也称方均根.效值.英语写为:Root Mean Square(RMS). 美国传统词典的定义为:The square root of the average of squar ...

  10. gitlab quickly install

    一.安装gitlab依赖环境 yum -y install vim wget epel-release  yum install curl policycoreutils openssh-server ...