ES
有趣的难受
你对这个世界有多大的认知,就决定你能挣多少钱。
展开
-
es 批量修改数据里面的值
【代码】es 批量修改数据里面的值。原创 2023-06-15 18:12:53 · 485 阅读 · 0 评论 -
es 通过大小更新
es 大小更新原创 2022-10-16 16:49:01 · 119 阅读 · 0 评论 -
es 随机查询几条
es原创 2022-07-28 22:20:13 · 765 阅读 · 0 评论 -
es routing的用法
http://localhost:8888/test/test1/106?routing=testroutehttp://localhost:8888/test/test1/106?routing=testroute,testroute1原创 2022-07-11 15:39:54 · 236 阅读 · 0 评论 -
es 新增节点后,分片会自动移动吗
es 分片原创 2022-07-07 14:51:11 · 406 阅读 · 0 评论 -
es嵌套查询示例
{ "_source": { "include": [ "level" ] }, "from": 0, "size": 500, "query": { "bool": { "must": [ { "nested": { "path": "level",原创 2021-08-15 19:16:38 · 709 阅读 · 0 评论 -
去重的sql语句转变成es语句
sql 语句 转变成es 语句SELECT DISTINCT(systemId) FROM customer{ "size": 0, "aggs": { "group_by_tags": { "terms": { "field": "systemId.keyword" } } }}原创 2021-07-23 14:41:00 · 211 阅读 · 0 评论 -
blocked by: [FORBIDDEN/12/index read-only / allow delete (api)
"cause": { "type": "cluster_block_exception", "reason": "blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];" }, "status": 403{ "index.blocks.read_only_allow_delete": null}https://www.ela...原创 2021-03-17 21:11:05 · 416 阅读 · 0 评论 -
es解除索引限制
PUT index/_settings{“index”: {“blocks”: {“read_only_allow_delete”: “false”}}}原创 2021-03-17 13:48:22 · 399 阅读 · 0 评论 -
es index个数
http://localhost:9488/_cat/indices?v原创 2021-03-11 16:22:13 · 531 阅读 · 0 评论 -
es拓展汇总
https://blog.csdn.net/LJFPHP/article/details/89883634原创 2021-01-20 23:21:43 · 154 阅读 · 0 评论 -
es实现模糊和精准2中查询
"source.strain": { "type": "muti_field", "fields": { "name": { "type": "string", "index": "analyzed" }, "untouched": { "type": "string", ...原创 2021-01-19 13:51:48 · 1096 阅读 · 0 评论 -
es添加最大消息返回数量
PUTip:9200/index/type/_setting{ "index": { "index.max_result_window": 2147483647 }}原创 2021-01-14 17:28:24 · 351 阅读 · 0 评论 -
es 更新指定字段的方法
post ip + 端口、index/_id/_udpate{ "doc" : { "content" : "深圳有限公司 法人代表 断网,在《律兜互联》订单,成功支付 1000 元。" }}原创 2020-12-30 23:53:59 · 9959 阅读 · 1 评论 -
es查询一个机器下所有的mapping
es查询所有mappinghttp://localhost:9488/_cat/indices原创 2020-12-27 17:45:48 · 1498 阅读 · 0 评论 -
es 数据导入和导出
elasticdump --input=http://ip:9200/baochuan_pro --output=C:/qbc/baochuan.jsonelasticdump --input=C:/qbc/baochuan.json --output=http://ip:9200/baochuan_pro原创 2020-12-19 00:42:42 · 7841 阅读 · 1 评论 -
windows es 指定自己的jdk
1、elasticsearch-env.batrem now set the path to javaif defined JAVA_HOME ( set JAVA="%JAVA_HOME%\bin\java.exe") else ( for %%I in (java.exe) do set JAVA="%%~$PATH:I")改成rem now set the path to javaset JAVA_HOME=C:\qbc\Java\jdk1.8.0_221if "%JAVA_原创 2020-12-14 13:45:14 · 1416 阅读 · 1 评论 -
es防止崩溃
elasticsearch.yml中设置防止内存交换bootstrap.mlockall: truehttps://www.cnblogs.com/zhi-leaf/p/6180492.html原创 2020-12-13 01:59:36 · 418 阅读 · 0 评论 -
es导出数据
1、es导出elasticdump --input=http://39.98.159.13:9200/baochuan_pro --output=C:/qbc/baochuan.json2、es导入elasticdump --input=C:/qbc/baochuan.json --output=http://39.98.159.13:9200/baochuan_pro原创 2020-12-07 20:49:11 · 982 阅读 · 0 评论 -
es另一个中创建mapping 的方式
如果不想单独创建mapping,可以使用上一节的方法(创建索引时创建mappings)。假设我们的项目中有多个环境(开发环境、测试环境等),那每一个环境的mapping总要一致的吧,那每次创建一次mappings就比较麻烦了,而且还容易导致数据不一致。莫急,ES还给我们准备另外一种创建mapping的方式。可以按照下面的步骤来做。步骤1 创建一个扩展名为test_type.json的文件名,其中type_test就是mapping所对应的type名。步骤2 在test_type.json中输入mapp原创 2020-12-04 19:23:48 · 1460 阅读 · 0 评论 -
es高阶指南
https://cloud.tencent.com/developer/article/1351712原创 2020-12-04 18:49:48 · 208 阅读 · 0 评论 -
2020-11-26
查询es中某个字段为“”或nullBoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery(); boolQueryBuilder.must( QueryBuilders.boolQuery() .should(QueryBuilders.termQuery("要查的列名","")) .should(QueryBuilders.boolQuery().mustNot(QueryBuilders.e原创 2020-11-26 10:59:35 · 59 阅读 · 0 评论 -
es局部更新
文档的部分更新在 更新整个文档 , 我们已经介绍过 更新一个文档的方法是检索并修改它,然后重新索引整个文档,这的确如此。然而,使用 update API 我们还可以部分更新文档,例如在某个请求时对计数器进行累加。...原创 2020-09-04 14:29:32 · 585 阅读 · 0 评论 -
es批量更新demo
{ "script": { "source": "ctx._source['servantOa']='chushihua'" }, "query": { "match_all": {} }}原创 2020-09-01 09:39:40 · 999 阅读 · 0 评论 -
es 新增字段类型写法 和es修改字段类型写法
es 新增字段类型写法put index/_mapping/type内容直接是type 不要携带mapping原创 2020-06-16 17:08:02 · 4662 阅读 · 0 评论 -
es 父子文档 inner_hits可以将子文档带出 默认只查3条 可以自己设置 size,from
es原创 2020-05-09 19:24:06 · 2715 阅读 · 4 评论 -
es 7以上版本创建index
必须要先创建index mappingPUT ip:9200/test{ "mappings": { "properties": { "cid": { "type": "long" }, "companyName": { "type":...原创 2020-04-27 09:13:15 · 1458 阅读 · 0 评论 -
es 有账号密码如何使用postman Authorization
1、使用浏览器请求你的 es:9200F12 去查看请求的header Authorization拿到header 的值放到postman header 里面原创 2020-04-24 09:14:41 · 4172 阅读 · 0 评论 -
es 查询 删除父子文档子结构数据
{ "query":{ "has_child":{ "type":"bookContent", "query":{ "match":{ "currentPageContent":"中心" } }, ...原创 2020-03-24 17:44:55 · 971 阅读 · 1 评论 -
es删除数据
post index/type/_delete_by_querytest/book/_delete_by_query{ "query": { "match": { "bookId":2} }}查询 bookId=2 然后全部删除全部删除{ "query": { "match_all": {} }}...原创 2020-03-24 17:38:34 · 644 阅读 · 0 评论 -
es 删除索引
DELETE ip:9200/index原创 2020-03-24 16:45:28 · 2735 阅读 · 0 评论 -
es multi_match 和 has_child取并集,java es 顶级使用
// 多字段模糊查询 QueryBuilder queryBuilder = QueryBuilders.multiMatchQuery(esMessage.getPwd() , "englishName" , "chineseName" , "author" ...原创 2020-03-20 22:35:35 · 1243 阅读 · 0 评论 -
es 6.x 父子结构
https://www.cnblogs.com/yulinfeng/p/11223205.html原创 2020-03-11 19:50:47 · 724 阅读 · 0 评论 -
es java 使用指南
created 字段 gt 大于gte 大于等于lt 小于lte 小于等于QueryBuilders.rangeQuery(“created”).gt(30).lte(60)原创 2020-03-06 09:43:35 · 650 阅读 · 0 评论 -
es 删除数据的方法,postman,linux,bat
_search 命令是查询9200/index/type/_search_delete_by_query 命令是删除9200/index/type/_delete_by_query注:删除也是先走和查询一样的语法,只是最后的命令是 删除的命令删除后语法{“took”: 18,“timed_out”: false,“total”: 1,“deleted”: 1,“batch...原创 2020-03-06 00:50:35 · 22461 阅读 · 1 评论 -
es 中的坑
postman 可以直接访问 es有账号密码的认证方案是 es 可以通过restful 认证直接在postman header中添加认证方式原创 2019-10-17 16:59:57 · 644 阅读 · 0 评论