ElasticSearch Index API
来源:互联网 发布:淘宝衣服评价语20字 编辑:程序博客网 时间:2024/05/16 07:48
Index添加或者更新一种类型JSON文档在一个特定的索引,让它可以被搜索。比如下面,添加:
curl-XPUT'http://localhost:9200/twitter/tweet/1'-d'{
"user":"kimchy",
"post_date":"2009-11-15T14:12:12",
"message":"trying out Elasticsearch"
}'
执行结果:
{"_shards":{"total":10,"failed":0,"successful":10},
"_index":"twitter","_type":"tweet","_id":"1","_version":1,"created":true}
total
- Indicates to how many shard copies (primary and replica shards) the index operation should be executed on.successful
- Indicates the number of shard copies the index operation succeeded on.成功successful至少为1failures
- An array that contains replication related errors in the case an index operation failed on a replica shard.
另外下面还可以有个版本控制:
curl-XPUT'localhost:9200/twitter/tweet/1?version=2'-d'{"message":"elasticsearch now has versioning support, double cool!"}'
0 0
- ElasticSearch Index API
- Elasticsearch java API (6) index API
- 分布式搜索引擎elasticsearch PHP API index curd
- ElasticSearch-API-Index的使用亲测
- elasticsearch之Document APIs【Index API】
- [ElasticSearch]Java API 之 索引文档 (Index API)
- 分布式搜索引擎elasticsearch PHP API index mapping操作
- 分布式搜索引擎elasticsearch PHP API index bulk 批量插入操作
- Elasticsearch Java API 之Index type mapping json创建修改
- ElasticSearch详解二之——index api
- elasticsearch-java api之索引(index)的各种操作
- elasticsearch index type
- elasticsearch之index模块
- elasticsearch查看所有index
- elasticsearch mapping index 说明
- elasticsearch 操作 index 命令
- elasticsearch index and store
- API Index
- 问题解决:The project cannot be built until build path errors are resolved
- android简单的竖线流程图介绍
- ListOrderedMap与Map的区别
- 【转载】 如何在Eclipse下查看 JDK 源代码
- java教程、java学习:Java数据缓存实现的核心机制
- ElasticSearch Index API
- [转]Django实战(11):修改Model类
- kafka系列4-什么是kafka
- 基于蓝牙BLE的室内定位技术研究与实现
- 实验帖
- js文字循环滚动
- USACO5.3 IDDFS_强连通_二维树状数组_斐蜀定理_矩形切割
- 文件上传form属性:enctype=multipart/form-data
- 每天laravel-20160818| Container -21