05_Elasticsearch 单模式下API的增删改查操作

安装marvel 插件:
zjtest7-redis:/usr/local/elasticsearch-2.3.4# bin/plugin install license
-> Installing license...
Trying https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/license/2.3.4/license-2.3.4.zip ...
Downloading .......DONE
Verifying https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/license/2.3.4/license-2.3.4.zip checksums if available ...
Downloading .DONE
Installed license into /usr/local/elasticsearch-2.3.4/plugins/license zjtest7-redis:/usr/local/elasticsearch-2.3.4# bin/plugin install marvel-agent
-> Installing marvel-agent...
Trying https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/marvel-agent/2.3.4/marvel-agent-2.3.4.zip ...
Downloading ..........DONE
Verifying https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/marvel-agent/2.3.4/marvel-agent-2.3.4.zip checksums if available ...
Downloading .DONE
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: plugin requires additional permissions @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
* java.lang.RuntimePermission setFactory
* javax.net.ssl.SSLPermission setHostnameVerifier
See http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
for descriptions of what these permissions allow and the associated risks. Continue with installation? [y/N]y
Installed marvel-agent into /usr/local/elasticsearch-2.3.4/plugins/marvel-agent
zjtest7-redis:/usr/local/elasticsearch-2.3.4# ./elasticsearch/bin/plugin install marvel-agent
./kiabana/bin/kibana plugin --install elasticsearch/marvel/latest 5.1 索引初始化操作; 创建索引之前可以对索引做初始化操作, 比如指定shards数量以及replicas的数量 http://192.168.32.81:9200/library/
PUT
{"settings":{"number_of_shards":3,"number_of_replicas":0}} GET 方法:
http://192.168.32.81:9200/library/
GET
查询 { "library": {
"aliases": { },
"mappings": { },
"settings": {
"index": {
"creation_date": "1473139251510",
"number_of_shards": "3",
"number_of_replicas": "0",
"uuid": "EWWTPObRSpKyQW8pVgWYGQ",
"version": {
"created": "2030499"
}
}
},
"warmers": { }
} } 获取内容;
http://192.168.32.81:9200/library/_settings/
GET { "library": {
"settings": {
"index": {
"creation_date": "1473139251510",
"number_of_shards": "3",
"number_of_replicas": "0",
"uuid": "EWWTPObRSpKyQW8pVgWYGQ",
"version": {
"created": "2030499"
}
}
}
} } 5.2 通过API创建,删除索引 索引名称
|
| |Type名称
| |
PUT /library/books/1 --文档ID http://192.168.32.81:9200/library/books/1/
PUT
{
"title":"Elasticsearch:The scan",
"name" : {
"first":"aaa",
"last" :"bbb"
},
"publish_date":"2016-09-06",
"price":"49"
} 通过_source获取指定字段名称: http://192.168.32.81:9200/
library/books/1/?_source=price GET 返回:
{ "_index": "library",
"_type": "books",
"_id": "1",
"_version": 10,
"found": true,
"_source": {
"price": "49"
} } 更新:
http://192.168.32.81:9200/
library/books/1/_update POST {
"doc":{
"price":10.001
}
}

05_Elasticsearch 单模式下API的增删改查操作的更多相关文章

  1. Elasticsearch 单模式下API的增删改查操作

    <pre name="code" class="html">Elasticsearch 单模式下API的增删改查操作 http://192.168. ...

  2. Elasticsearch学习系列之单模式下API的增删改查操作

    这里我们通过Elasticsearch的marvel插件实现单模式下API的增删改查操作 索引的初始化操作 创建索引之前可以对索引进行初始化操作,比如先指定shard数量以及replicas的数量 代 ...

  3. Django项目的创建与介绍.应用的创建与介绍.启动项目.pycharm创建启动项目.生命周期.三件套.静态文件.请求及数据.配置Mysql完成数据迁移.单表ORM记录的增删改查

    一.Django项目的创建与介绍 ''' 安装Django #在cmd中输入pip3 #出现这个错误Fatal error in launcher: Unable to create process ...

  4. Hadoop基础-HDFS的API实现增删改查

    Hadoop基础-HDFS的API实现增删改查 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 本篇博客开发IDE使用的是Idea,如果没有安装Idea软件的可以去下载安装,如何安装 ...

  5. MongoDB(二)-- Java API 实现增删改查

    一.下载jar包 http://central.maven.org/maven2/org/mongodb/mongo-java-driver/ 二.代码实现 package com.xbq.mongo ...

  6. (转)SQLite数据库增删改查操作

    原文:http://www.cnblogs.com/linjiqin/archive/2011/05/26/2059182.html SQLite数据库增删改查操作 一.使用嵌入式关系型SQLite数 ...

  7. Android SQLite 数据库 增删改查操作

    Android SQLite 数据库 增删改查操作 转载▼ 一.使用嵌入式关系型SQLite数据库存储数据 在Android平台上,集成了一个嵌入式关系型数据库--SQLite,SQLite3支持NU ...

  8. Hibernate5笔记2--单表的增删改查操作

    单表的增删改查操作: (1)定义获取Session和SessionFactory的工具类: package com.tongji.utils; import org.hibernate.Session ...

  9. 【OF框架】新建库表及对应实体,并实现简单的增删改查操作,封装操作标准WebApi

    准备 搭建好项目框架及数据库,了解框架规范. 1.数据库表和实体一一对应,表名实体名名字相同,用小写,下划线连接.字段名用驼峰命名法,首字母大写. 2.实体放在Entities目录下,继承Entity ...

随机推荐

  1. NOI2013 树的计数

    题目:http://uoj.ac/problem/122 85%做法: 动态规划. 首先重编号,BFS序变成1...n,然后DFS序相应重编号. 记pos[i]为i号点在DFS中的位置,即pos[d[ ...

  2. Jquery让图片根据浏览器窗口大小自动缩放

    (function($){ $.fn.resizeimage = function(){ var imgLoad = function (url, callback) { var img = new ...

  3. NET分布式缓存Memcached测试体验

    原文地址:http://onlyonewt.blog.sohu.com/160168896.html 一直在学习关注大访问量网站的缓存是如何实现,之前看过Memcached的资料,忙于没有时间来真正测 ...

  4. Codeforce 220 div2

    D 插入: 在当前指针位置sz处插入一个1,col[sz]记录插入的内容,sz++; 删除i: 找到第i个1的位置,赋为0; 于是转化为一个维护区间和的问题; trick: 如果是依次删除a[0],a ...

  5. jQuery旋转插件jqueryrotate 图片旋转

    "jquery.rotate.min.js"是jQuery旋转rotate插件,支持Internet Explorer 6.0+ .Firefox 2.0 .Safari 3 .O ...

  6. Hive集成HBase详解

    摘要 Hive提供了与HBase的集成,使得能够在HBase表上使用HQL语句进行查询 插入操作以及进行Join和Union等复杂查询   应用场景 1. 将ETL操作的数据存入HBase 2. HB ...

  7. [Node.js] Using ES6 and beyond with Node.js

    If you're used to using all the latest ES6+ hotness on the front end via Babel, working in Node.js c ...

  8. js jsp 时间 日期 控件 插件 简单 实用

    js时间控件一般都是找网上的用,这东西平常很少涉及到,一用到找起来却烦死人,不是没用就是太复杂,今天向大家推荐一个简单实用的控件,该控件在不断更新,而且有专门的网站对它进行维护,所以值得一看. 先说它 ...

  9. FileZilla简单介绍及运用

    一.FileZilla简介 FileZilla是一款免费开源的FTP客户端软件,并且还提供了服务器版本.虽然它是免费软件,可性能却一点也不含糊,比起那些共享软件来有过之而无不及,具备大多数的FTP软件 ...

  10. 『转载』Debussy快速上手(Verdi相似)

    『转载』Debussy快速上手(Verdi相似) Debussy 是NOVAS Software, Inc(思源科技)发展的HDL Debug & Analysis tool,这套软体主要不是 ...