“慢生活”不是懒惰,放慢速度不是拖延时间,而是让我们在生活中寻找到平衡。网站首页程序人生
elasticSearch更新api(类似mysql的自增)
发布时间:2021-08-31 21:22:35作者:雪饮
![[!--pagekey--]](/d/file/manshenghuo/chengxurensheng/4162975066f11f5ab005440b7357a971.png)
现在我想要这个字段的值变成2004,也就是它自身增加4个单位。则在elasticSearch中可以这样做:http://localhost:9200/schools/_update/1 post请求正文:{ "script" : { "sou
阅读全文>>elasticSearch获取api以及_source的用法
发布时间:2021-08-31 18:36:17作者:雪饮
![[!--pagekey--]](/e/data/images/notimg.gif)
在elasticSearch中获取一个文档,它的通常做法,一个请求如:Get http://localhost:9200/schools/school/1请求正文:none响应体:{ "_index": "schools", "_type": "school",
阅读全文>>elasticSearch超时与单映射
发布时间:2021-08-31 14:09:16作者:雪饮
![[!--pagekey--]](/d/file/manshenghuo/chengxurensheng/7a458052068fc0e87197649f4dbf2801.png)
超时默认情况下,索引操作将在主分片上最多等待1分钟,超过后就会失败并响应错误。 可以通过将值传递给timeout参数来显式更改这个超时值。像下面这个请求:http://localhost:9200
阅读全文>>elasticSearch更新子文档
发布时间:2021-08-30 19:56:15作者:雪饮
![[!--pagekey--]](/e/data/images/notimg.gif)
在elasticSearch中更新子文档和普通的文档的更新是有区别的,更新子文档和索引子文档是一样的。一个更新子文档的请求如:http://localhost:9200/my-index-000001/_doc/answer1?
阅读全文>>elasticSearch查看子文档
发布时间:2021-08-30 18:09:41作者:雪饮
![[!--pagekey--]](/e/data/images/notimg.gif)
ElasticSearch查询子文档,其实有两种方法,一种是像普通文档一样查询,如:http://localhost:9200/my-index-000001/_doc/answer1 get请求体:none响应体:{ "_index": "my-index-0
阅读全文>>