随笔分类 -  Elasticsearch

摘要:{ "query": { "bool": { "must": [{ "match_phrase": { "type_id": 123 } }], "should": [{ "match_phrase": { "title": "常德" } }, { "match_phrase": { "conten 阅读全文
posted @ 2023-03-06 16:55 赵瑛 阅读(172) 评论(0) 推荐(0) 编辑
摘要:http://127.0.0.1:9200/aaaaaa/_search{ "from": 0, "size": 0, "aggs": { "my":{ "terms":{ "field": "id" } } } } 阅读全文
posted @ 2023-02-24 17:21 赵瑛 阅读(171) 评论(0) 推荐(0) 编辑
摘要:比如我要查询Elasticsearch库中字段为:id的有没有重复数据,可以用下面的方法,先查询出来,再执行删除。 from=0;size = 0; url=http://127.0.0.1/aaaaaa/search;data['from'] = from;data 阅读全文
posted @ 2023-02-23 11:36 赵瑛 阅读(512) 评论(0) 推荐(0) 编辑
摘要:其中的条件类似于mysql的where cate_id=cateidand(title=keyword or content=keyword)keyword = '常德学院'; cateid=148;url = 'http://127.0.0.1/aaaaaaa/_sea 阅读全文
posted @ 2023-02-22 16:42 赵瑛 阅读(353) 评论(0) 推荐(0) 编辑
摘要:bool query 一种复合查询,把其余类型的查询包裹进来。支持以下三种逻辑关系。 must: AND must_not:NOT should:OR 阅读全文
posted @ 2023-02-22 16:18 赵瑛 阅读(110) 评论(0) 推荐(0) 编辑
摘要:ClientBuilder=newClientBuilder();esClient = ClientBuilder>create()>setHosts([config(searchhost)])>build();params['index'] = config('sea 阅读全文
posted @ 2022-01-07 08:20 赵瑛 阅读(1174) 评论(0) 推荐(0) 编辑

版权所有 © 2022 沅来是澧

如果有程序开发、网站建设等需求的请联系我,QQ:47419233

点击右上角即可分享
微信分享提示