我使用suing "d3": "^4.10.0",并"@types/d3": "^4.10.0",在我的角度4项目中突然开始抛出错误
ERROR in @types/d3-geo/index.d.ts (39,19): Namespace '"@types/geojson/index"' has no exported member 'CoordinateReferenceSystem'.
Run Code Online (Sandbox Code Playgroud)
我遇到过这个使用geojson的文件 https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/d3-geo/index.d.ts
但我觉得geojson的类型定义没有更新,或者我使用的是worng版本,有人可以帮助我.
有人可以帮我在弹性搜索中获取嵌套对象的聚合计数,假设我的弹性搜索对象映射为:
{
"employe": {
"dynamic": "strict",
"properties": {
"empId":{
"type": "keyword"
},
"entities": {
"type": "nested"
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
实体是具有其他对象的数组类型。我想获得过滤项目的实体数量。我尝试了一些弹性搜索查询,但它不起作用
{
"query": {
"bool": {
"filter": [
{
"terms": {
"empId": [12121,2121212]
}
}
]
}
},
"size": 0,
"aggs": {
"entities_agg": {
"sum": {
"field": "entities",
"script": {
"inline": "doc['entities'].values.size()"
}
}
}
}
}
Run Code Online (Sandbox Code Playgroud) javascript elasticsearch elasticsearch-plugin elasticsearch-5 kibana-5