- 博客(7)
- 资源 (14)
- 收藏
- 关注
原创 Elasticsearch 高亮搜索
高亮搜索POST /index/_search{"query": {"match": {"field": "中国"}},"highlight": {"fields": {"field": {"pre_tags": "","post_tags": ""}}}}
2018-01-25 18:17:14 546
原创 Elasticsearch 经纬度 范围查询
location 经纬度字段,distance 距离中心范围KM,lat lon 圆心经纬度distanceQueryBuilder = QueryBuilders.geoDistanceQuery(location) .distance(distance, DistanceUnit.KILOMETERS) .point(new GeoPoint(lat, lon));
2018-01-25 18:13:13 7921 2
原创 Elasticsearch 聚合查询
聚合字段需要为keyword类型、text类型需设置fielddata为true,将按照分词聚合GET /my_index/_search{"query": {"size": 0, "aggs": {"models": {"terms": { "field": "status_keyword" }}}}
2018-01-25 18:05:05 2815
原创 Elasticsearch 索引新增字段并且设置mappping
添加字段并设置类型PUT /my_index/_mapping/my_type{"base_policy_basic_info": {"properties": {"city": {"type": "text","analyzer":"ik_max_word","fields":{"raw": {"type": "keyword"}}}
2018-01-25 17:56:59 4231 3
原创 Elasticsearch 对Text类型进行聚合
设置mapping的时候需要设置fielddata 为truePUT my_index/_mapping/my_type{ "properties": { "my_field": { "type": "text", "fielddata": true } }}
2018-01-25 17:23:13 4892 1
原创 Elasticsearch 不停机跟新索引(更新别名)
POST /_aliases{"actions": [{ "remove": {"index": "旧索引名","alias": "别名"} },{ "add": {"index": "新索引名","alias": "别名"} }]}
2018-01-25 17:21:18 747
原创 Elasticsearch 按照字段的长度过滤 (该字段 必须为 keyword 类型)
ES查询中,有时候我们需要按照字段的长度过滤。以下为方法:GET hockey/_search{ "query": { "script": { "script": { "source": "doc['city'][0].length()>3", "lang": "painless" }
2018-01-25 17:13:10 10356
elasticsearch-6.0.0-Windows免安装版
2018-01-17
ElasticSearch搜索在线谷歌插件。ElasticSearch Head
2018-01-17
Selenium2 Java自动化测试实战
2017-02-19
tomcat-6.0,本人亲测适用版
2014-10-23
Everything-文件查找 大家熟悉的查找文件软件
2014-10-23
SAP 18种根据屏幕字段找数据表的方法
2014-10-23
SAP ABAP编程 创建BAPI教程
2014-10-23
SAP与ABAP字符的对应关系
2014-10-23
BC ABAP/4 用户帮助文档(中文版)
2014-10-23
ABAP初步培训教材
2014-10-23
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人