ES5.2.2支持geo排序+聚合
Elasticsearch • liushui00001 发表了文章 • 1 个评论 • 3747 次浏览 • 2017-05-06 16:50
具体查询条件,这里不写了;
查询结果如下:
{ "took": 90, "timed_out": false, "_shards": { "total": 5, "successful": 5, "failed": 0 }, "hits": { "total": 10, "max_score": null, "hits": [ { "_index": "testindex", "_type": "testdoc07", "_id": "1-1000000", "_score": null, "_source": { "comId": 1, "comName": "佛山消防支队", "elemetType": 2, "equipCode": "1000000", "equipName": "灭火剂0", "equipValue": 73, "location": { "lat": 23.027237, "lon": 113.123618 }, "phone": "15986190299", "userName": "李成龙" }, "sort": [ 3740.583503580435 ] }, { "_index": "testindex", "_type": "testdoc07", "_id": "1-1000003", "_score": null, "_source": { "comId": 1, "comName": "佛山消防支队", "elemetType": 2, "equipCode": "1000003", "equipName": "灭火剂3", "equipValue": 47, "location": { "lat": 23.027237, "lon": 113.123618 }, "phone": "15986190299", "userName": "李成龙" }, "sort": [ 3740.583503580435 ] }, { "_index": "testindex", "_type": "testdoc07", "_id": "1-1000001", "_score": null, "_source": { "comId": 1, "comName": "佛山消防支队", "elemetType": 2, "equipCode": "1000001", "equipName": "灭火剂1", "equipValue": 12, "location": { "lat": 23.027237, "lon": 113.123618 }, "phone": "15986190299", "userName": "李成龙" }, "sort": [ 3740.583503580435 ] }, { "_index": "testindex", "_type": "testdoc07", "_id": "1-1000004", "_score": null, "_source": { "comId": 1, "comName": "佛山消防支队", "elemetType": 2, "equipCode": "1000004", "equipName": "灭火剂4", "equipValue": 2, "location": { "lat": 23.027237, "lon": 113.123618 }, "phone": "15986190299", "userName": "李成龙" }, "sort": [ 3740.583503580435 ] }, { "_index": "testindex", "_type": "testdoc07", "_id": "1-1000002", "_score": null, "_source": { "comId": 1, "comName": "佛山消防支队", "elemetType": 2, "equipCode": "1000002", "equipName": "灭火剂2", "equipValue": 57, "location": { "lat": 23.027237, "lon": 113.123618 }, "phone": "15986190299", "userName": "李成龙" }, "sort": [ 3740.583503580435 ] }, { "_index": "testindex", "_type": "testdoc07", "_id": "2-1000018", "_score": null, "_source": { "comId": 2, "comName": "禅城大队", "elemetType": 2, "equipCode": "1000018", "equipName": "灭火剂8", "equipValue": 61, "location": { "lat": 23.057237, "lon": 113.103618 }, "phone": "13925403119", "userName": "郭武斌" }, "sort": [ 7648.2045946025555 ] }, { "_index": "testindex", "_type": "testdoc07", "_id": "2-1000014", "_score": null, "_source": { "comId": 2, "comName": "禅城大队", "elemetType": 2, "equipCode": "1000014", "equipName": "灭火剂4", "equipValue": 81, "location": { "lat": 23.057237, "lon": 113.103618 }, "phone": "13925403119", "userName": "郭武斌" }, "sort": [ 7648.2045946025555 ] }, { "_index": "testindex", "_type": "testdoc07", "_id": "2-1000016", "_score": null, "_source": { "comId": 2, "comName": "禅城大队", "elemetType": 2, "equipCode": "1000016", "equipName": "灭火剂6", "equipValue": 81, "location": { "lat": 23.057237, "lon": 113.103618 }, "phone": "13925403119", "userName": "郭武斌" }, "sort": [ 7648.2045946025555 ] }, { "_index": "testindex", "_type": "testdoc07", "_id": "2-1000015", "_score": null, "_source": { "comId": 2, "comName": "禅城大队", "elemetType": 2, "equipCode": "1000015", "equipName": "灭火剂5", "equipValue": 87, "location": { "lat": 23.057237, "lon": 113.103618 }, "phone": "13925403119", "userName": "郭武斌" }, "sort": [ 7648.2045946025555 ] }, { "_index": "testindex", "_type": "testdoc07", "_id": "2-1000017", "_score": null, "_source": { "comId": 2, "comName": "禅城大队", "elemetType": 2, "equipCode": "1000017", "equipName": "灭火剂7", "equipValue": 90, "location": { "lat": 23.057237, "lon": 113.103618 }, "phone": "13925403119", "userName": "郭武斌" }, "sort": [ 7648.2045946025555 ] } ] }, "aggregations": { "aggEquip": { "doc_count_error_upper_bound": 0, "sum_other_doc_count": 0, "buckets": [ { "key": "1000000", "doc_count": 1, "sumEquipValue": { "value": 73 } }, { "key": "1000001", "doc_count": 1, "sumEquipValue": { "value": 12 } }, { "key": "1000002", "doc_count": 1, "sumEquipValue": { "value": 57 } }, { "key": "1000003", "doc_count": 1, "sumEquipValue": { "value": 47 } }, { "key": "1000004", "doc_count": 1, "sumEquipValue": { "value": 2 } }, { "key": "1000014", "doc_count": 1, "sumEquipValue": { "value": 81 } }, { "key": "1000015", "doc_count": 1, "sumEquipValue": { "value": 87 } }, { "key": "1000016", "doc_count": 1, "sumEquipValue": { "value": 81 } }, { "key": "1000017", "doc_count": 1, "sumEquipValue": { "value": 90 } }, { "key": "1000018", "doc_count": 1, "sumEquipValue": { "value": 61 } }, { "key": "10000210", "doc_count": 1, "sumEquipValue": { "value": 70 } }, { "key": "10000211", "doc_count": 1, "sumEquipValue": { "value": 55 } }, { "key": "1000027", "doc_count": 1, "sumEquipValue": { "value": 19 } }, { "key": "1000028", "doc_count": 1, "sumEquipValue": { "value": 25 } }, { "key": "1000029", "doc_count": 1, "sumEquipValue": { "value": 3 } }, { "key": "10000311", "doc_count": 1, "sumEquipValue": { "value": 97 } }, { "key": "10000312", "doc_count": 1, "sumEquipValue": { "value": 79 } }, { "key": "10000313", "doc_count": 1, "sumEquipValue": { "value": 95 } }, { "key": "10000314", "doc_count": 1, "sumEquipValue": { "value": 6 } }, { "key": "10000315", "doc_count": 1, "sumEquipValue": { "value": 8 } } ] } } }
ES5.2.2支持geo距离排序+聚合查询吗?
回复Elasticsearch • liushui00001 发起了问题 • 1 人关注 • 0 个回复 • 4324 次浏览 • 2017-05-06 16:28
用zabbix监控es
Elasticsearch • Max 发表了文章 • 0 个评论 • 9213 次浏览 • 2017-05-06 14:18
5.3.2版本报 java.lang.NoClassDefFoundError: org/apache/lucene/util/SetOnce
Elasticsearch • vidi 回复了问题 • 5 人关注 • 5 个回复 • 15293 次浏览 • 2018-07-12 09:28
有关logstash jdbc 插件增量拉取数据,跟踪列为数值或日期的问题
Logstash • leo2018 回复了问题 • 7 人关注 • 2 个回复 • 14587 次浏览 • 2018-07-10 11:24
sqlserver2005如何同步数据到elasticsearch5.2.2
Elasticsearch • gzliudan 回复了问题 • 2 人关注 • 1 个回复 • 4281 次浏览 • 2017-08-15 18:16
_source/_all特性效果
Elasticsearch • liushui00001 发表了文章 • 3 个评论 • 4029 次浏览 • 2017-05-05 18:13
1. _source可用通过配置includes、excludes获取应用需要的field
"_source": {
"enabled": true,
"includes": [
"comId",
"name",
"userName",
"equips.name",
"equips.amount"
],
"excludes": [
"phone",
"equips.code"
]
},
2.设置enabled=false关闭_source功能,关闭后,查询结果只返回doc的ID,而不会返回_source
"_source": {
"enabled": false,
3._all、include_in_all结合使用,是用户可用通过_all分词查询多个字段,而不需要写多个查询条件
"mappings": {
"testdoc03": {
"_all": {
"enabled": true
},
"_source": {
"enabled": false,
"includes": [
"comId",
"name",
"userName",
"equips.name",
"equips.amount"
],
"excludes": [
"phone",
"equips.code"
]
},
"properties": {
"comId": {
"type": "long"
},
"equips": {
"properties": {
"amount": {
"type": "double",
"include_in_all": true
},
"code": {
"type": "text"
},
"name": {
"type": "text",
"include_in_all": true
}
}
},
"name": {
"type": "text",
"include_in_all": true
},
"phone": {
"type": "keyword"
},
"userName": {
"type": "text",
"include_in_all": true
}
}
}
}
}
logstash 配置无法写入redis
Logstash • leighton_buaa 回复了问题 • 2 人关注 • 1 个回复 • 4929 次浏览 • 2017-05-06 10:01
ES5.4中Java Transport Client 报错问题
Elasticsearch • syj 回复了问题 • 3 人关注 • 3 个回复 • 9000 次浏览 • 2017-05-06 12:50
filebeat怎么设置从头开始读取
Logstash • hgditren 回复了问题 • 4 人关注 • 3 个回复 • 20648 次浏览 • 2021-03-25 19:28
elasticsearch non-heap mem构成?
回复Elasticsearch • wengqiankun 发起了问题 • 2 人关注 • 0 个回复 • 3009 次浏览 • 2017-05-05 15:45
Cannot evaluate org.elasticsearch.common.inject.InjectorImpl.toString()
Elasticsearch • medcl 回复了问题 • 2 人关注 • 1 个回复 • 12052 次浏览 • 2017-05-05 22:47
需要把 Mysql 的数据转移到ES中,有什么转移工具支持ES5.2.2呢
Elasticsearch • leighton_buaa 回复了问题 • 4 人关注 • 2 个回复 • 3383 次浏览 • 2017-05-06 09:49