(十)Modifying Your Data
Elasticsearch provides data manipulation and search capabilities in near real time. By default, you can expect a one second delay (refresh interval) from the time you index/update/delete your data until the time that it appears in your search results. This is an important distinction from other platforms like SQL wherein data is immediately available after a transaction is completed.
Indexing/Replacing Documents
We’ve previously seen how we can index a single document. Let’s recall that command again:
curl -X PUT "localhost:9200/customer/_doc/1?pretty" -H 'Content-Type: application/json' -d'
{
"name": "John Doe"
}
'
Again, the above will index the specified document into the customer index, with the ID of 1. If we then executed the above command again with a different (or same) document, Elasticsearch will replace (i.e. reindex) a new document on top of the existing one with the ID of 1:
curl -X PUT "localhost:9200/customer/_doc/1?pretty" -H 'Content-Type: application/json' -d'
{
"name": "Jane Doe"
}
'
curl -X PUT "localhost:9200/customer/_doc/2?pretty" -H 'Content-Type: application/json' -d'
{
"name": "Jane Doe"
}
'
The above indexes a new document with an ID of 2.
curl -X POST "localhost:9200/customer/_doc?pretty" -H 'Content-Type: application/json' -d'
{
"name": "Jane Doe"
}
'
Note that in the above case, we are using the POST verb instead of PUT since we didn’t specify an ID.
(十)Modifying Your Data的更多相关文章
- Bootstrap入门(二十四)data属性
Bootstrap入门(二十四)data属性 你可以仅仅通过 data 属性 API 就能使用所有的 Bootstrap 插件,无需写一行 JavaScript 代码.这是 Bootstrap 中的一 ...
- AngularJS进阶(十五)Cookie 'data' possibly not set or overflowed because it was too large
Cookie 'data' possibly not set or overflowed because it was too large (5287 > 4096 bytes)! 注:请点击此 ...
- Elasticsearch 入门 - Modifying Your Data
index/update/delete 均有大概1秒的缓存时间 Indexing/Replacing Documents curl -X PUT "localhost:9200/custom ...
- Elasticsearch-->Get Started-->Modifying Your Data
https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started-modify-data.html Mod ...
- swift语言点评十-Value and Reference Types
结论:value是拷贝,Reference是引用 Value and Reference Types Types in Swift fall into one of two categories: f ...
- (一) Getting Started
Elasticsearch is a highly scalable open-source full-text search and analytics engine. It allows you ...
- R2—《R in Nutshell》 读书笔记(连载)
R in Nutshell 前言 例子(nutshell包) 本书中的例子包括在nutshell的R包中,使用数据,需加载nutshell包 install.packages("nutshe ...
- Event Sourcing Pattern 事件源模式
Use an append-only store to record the full series of events that describe actions taken on data in ...
- Vector Tile
Mapbox Vector Tile Specification A specification for encoding tiled vector data. <?XML:NAMESPACE ...
随机推荐
- mongodb副本集高可用架构
一.简介 Mongodb复制集由一组Mongod实例(进程)组成,包含一个Primary节点和多个Secondary节点. Mongodb Driver(客户端)的所有数据都写入Primary,Sec ...
- PE知识复习之PE文件空白区添加代码
PE知识复习之PE文件空白区添加代码 一丶简介 根据上面所讲PE知识.我们已经可以实现我们的一点手段了.比如PE的入口点位置.改为我们的入口位置.并且填写我们的代码.这个就是空白区添加代码. 我们也可 ...
- angr进阶(6)绕过反调试
angr绕过反调试,一个是通过之前的方式,使用从特定位置开始测试的方法,还有一种通过hook进行反调试的方法. 其原理就在于angr能够符号化表示函数tumctf2016_zwiebe p.hook_ ...
- pwnable.tw unexploitable 分析
这题是和pwnable.kr差不多的一道题,主要区别在于没有给syscall.所以需要自己去找. 只有read和sleep两个函数. 思路一是首先劫持堆栈到bss段,然后调用read函数将sleep的 ...
- sysbench的框架实现介绍
sysbench是一个非常经典的综合性能测试工具,它支持CPU,IO,内存,尤其是数据库的性能测试.那它是怎么做到通用性的呢,总结一句话是大量运用了重载的方法. sysbench总体架构 sysben ...
- KVO原理解析
KVO在我们项目开发中,经常被用到,但很少会被人关注,但如果面试一些大公司,针对KVO的面试题可能如下: 知道KVO嘛,底层是怎么实现的? 如何动态的生成一个类? 今天我们围绕上面几个问题,我们先看K ...
- Nunit的尝试
(ps:没有代码,只有理论) 单元测试 单元测试(Unit Test)的一个测试用例(Test Case)是一小段代码,用于测试一个小的程序功能的行为是否正常,保证开发的功能子项能正确完成并实现其基本 ...
- EditPlus提示错误:找不到或无法加载主类
问题:EditPlus提示错误:找不到或无法加载主类. 原因:换了另外一台电脑,忘了什么时候,环境变量被误删了. 解决问题: 1.检查文件名和public修饰的类名是否一致. 2.文件查看时,有没有隐 ...
- TypeScript,初次见面,请多指教 ?
为什么用 TS ? 说实话,最开始并没有想把 TS 用到实际项目中来,一来是感觉"类型"会限制 JS 的优势(好吧,就是浪写浪惯了):二来听闻 TS + Redux 的酸爽滋味,有 ...
- 四边形不等式优化DP
记录一下,以免忘了 对于一个形如 \[dp[i][j]=min(dp[i][k]+dp[k][j]+w[i][j])\] 的转移方程(注意取最大值时不一定满足四边形不等式) 定理1 若对于\(a \l ...