摘要: 阅读全文
posted @ 2019-09-21 11:53 siye1989 阅读(306) 评论(0) 推荐(0) 编辑
摘要: 1、图解Elasticsearch内部如何基于_version进行乐观锁并发控制 (1)_version元数据 PUT /test_index/test_type/6{ "test_field": "test test"} { "_index": "test_index", "_type": "te 阅读全文
posted @ 2019-09-21 11:43 siye1989 阅读(676) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-09-21 11:33 siye1989 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-09-21 11:30 siye1989 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 1、document的全量替换 (1)语法与创建文档是一样的,如果document id不存在,那么就是创建;如果document id已经存在,那么就是全量替换操作,替换document的json串内容(2)document是不可变的,如果要修改document的内容,第一种方式就是全量替换,直接 阅读全文
posted @ 2019-09-21 11:26 siye1989 阅读(1240) 评论(0) 推荐(0) 编辑
摘要: 1、_source元数据 put /test_index/test_type/1{ "test_field1": "test field1", "test_field2": "test field2"} get /test_index/test_type/1 { "_index": "test_in 阅读全文
posted @ 2019-09-21 11:23 siye1989 阅读(1216) 评论(0) 推荐(0) 编辑
摘要: 1、手动指定document id (1)根据应用情况来说,是否满足手动指定document id的前提: 一般来说,是从某些其他的系统中,导入一些数据到es时,会采取这种方式,就是使用系统中已有数据的唯一标识,作为es中document的id。举个例子,比如说,我们现在在开发一个电商网站,做搜索功 阅读全文
posted @ 2019-09-21 11:15 siye1989 阅读(3257) 评论(0) 推荐(0) 编辑
摘要: 1、_index元数据2、_type元数据3、_id元数据 { "_index": "test_index", "_type": "test_type", "_id": "1", "_version": 1, "found": true, "_source": { "test_content": " 阅读全文
posted @ 2019-09-21 11:04 siye1989 阅读(11134) 评论(0) 推荐(0) 编辑