博客搬家 https://hanwang945.github.io/ Read More
posted @ 2018-05-28 17:16 奋斗超云 Views(340) Comments(0) Diggs(0) Edit
一、HotSpot内核模块组成和功能框架 1、HotSpot内核模块图 (1)Prims模块: (2)Service模块: (3)Runtime模块: 二、虚拟机生命周期(JVM初始化过程) 1、虚拟机生命周期时序图 1:Lancher JVM启动器 Lancher是用于启动JVM和应用程序的工具, Read More
posted @ 2019-01-22 12:45 奋斗超云 Views(4068) Comments(0) Diggs(0) Edit
一、多shard场景下relevance score不准确问题 1、问题描述: 多个shard下,如果每个shard包含指定搜索条件的document数量不均匀的情况下,会导致在某个shard上document数量少的时候,计算该指定搜索条件的document的相关性评分要虚高。导致该document比实际真正想要返回的document的评分要高。 2、解决 ... Read More
posted @ 2018-03-27 11:35 奋斗超云 Views(1447) Comments(0) Diggs(0) Edit
一.keyword 字段和keyword数据类型 1、测试准备数据POST /forum/article/_bulk{ "index": { "_id": 1 }}{ "articleID" : "XHDK-A-1293-#fJ3", "userID" : 1, "hidden": false, "postDate": "2017-01-01" }{ "index": { "_id": 2 ... Read More
posted @ 2018-02-05 15:23 奋斗超云 Views(3271) Comments(0) Diggs(1) Edit
一、Mapping的功能作用 Mapping是定义如何存储和索引一个document及其所包含字段的过程。 Mapping是index和type的元数据,每个type都有自己的一个mapping,决定了字段的数据类型和建立倒排索引的行为以及搜索的行为。mapping设置字段的数据类型的时候也设置了该字段是否为exact value还是full text Elasticsearch... Read More
posted @ 2018-01-30 10:43 奋斗超云 Views(6432) Comments(0) Diggs(1) Edit
一、批量查询 mget GET /_mget{ "docs":[ { "_index":"ecommerce", "_type":"product", "_id":1 }, { "_index":"ecommerce", "_type":"product", ... Read More
posted @ 2017-12-31 14:52 奋斗超云 Views(691) Comments(0) Diggs(0) Edit
一、什么是partial update?PUT /index/type/id,创建文档&替换文档,就是一样的语法一般对应到应用程序中,每次的执行流程基本是这样的:(1)应用程序先发起一个get请求,获取到document,展示到前台界面,供用户查看和修改(2)用户在前台界面修改数据,发送到后台(3)后台代码,会将用户修改的数据在内存中进行执行,然后封装好修改后的全量数据(4)然后发送PUT请求,到... Read More
posted @ 2017-12-31 11:38 奋斗超云 Views(1966) Comments(0) Diggs(0) Edit
一、基于_version的乐观锁并发控制 语法:PUT /test_index/test_type/id?version=xxx 更新时带上数据的版本号,只有版本号一致的情况下才可以修改,如果出现版本号不一致的情况或者丢弃该数据或者获取最新的版本号然后在进行更新PUT /test_index/test_type/7?version=1{ "... Read More
posted @ 2017-12-30 17:25 奋斗超云 Views(1066) Comments(0) Diggs(0) Edit
一、生成document id1、自动生成document id 自动生成的id,长度为20个字符,URL安全,base64编码,GUID,分布式系统并行生成时不可能会发生冲突 语法:POST /index/typePOST /test_index/test_type{ "test_conten... Read More
posted @ 2017-12-30 17:22 奋斗超云 Views(1611) Comments(0) Diggs(0) Edit
一、索引元数据执行:GET /ecommerce/product/1返回结果:{ "_index": "ecommerce", "_type": "product", "_id": "1", "_version": 1, "found": true, "_source": { "name": "gaolujie yagao", "desc": "g Read More
posted @ 2017-12-30 17:19 奋斗超云 Views(1453) Comments(0) Diggs(0) Edit