![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Elasticsearch
一只勤奋的代码狗
星辰大海
展开
-
ElasticSearch 强行_forcemerge?max_num_segments=1
使用这个地址可以查看索引的seg的数量情况:http://localhost:9200/_cat/indices/s=segmentsCount:desc&v&h=index,segmentsCount,segmentsMemory,memoryTotal,mergesCurrent,mergesCurrentDocs,storeSize,p,r本人用了一个大小是 55G的索引进行了:curl -X POST 'http://localhost:9200/comment2/_force原创 2021-06-23 16:33:28 · 1376 阅读 · 2 评论 -
elasticsearch agg聚合 count(distinct a),name group by name
POST users/_search{ "query": { "bool": { "must_not": [ { "term": { "course": { "value": "" } } } ] } }, "aggs": { "item_names": { "terms": {原创 2021-06-23 16:14:10 · 951 阅读 · 2 评论 -
ElasticSearch7 设置某个字段不分词
字符串 - text:用于全文索引,该类型的字段将通过分词器进行分词,最终用于构建索引字符串 - keyword:不分词,只能搜索该字段的完整的值,只用于条件精准查询PUT your_index { "mappings" : { "products" : { "properties" : { "item_id" : { "type" : "keyword", ...原创 2021-06-02 16:59:20 · 4015 阅读 · 4 评论