ESQueryStats Class

弹性搜索服务.ESQueryStats(option)

Fx构造函数

# new ESQueryStats(option)

Zondy.DataStore.ElasticSearch.ESQueryStats————DataStore的es数据查询统计接口。如果查询路径中只有数据库名、工作空间名和表名,则查询结果为对应表中要素信息,不包含属性;如果没有统计字段,则查询结果为查询结果对应的要素信息,是否包含属性与includeProperites是否为true相关;如果有统计字段,则查询结果只有对应的统计结果信息。

参数:
名称 类型 属性 默认值 描述
option Object

查询条件

libName String <optional>

必选。数据库名

tableName String <optional>

必选。表名

geometry String <optional>

可选。(geometry和extent,二选一)。几何信息,圆、多边形等

extent String <optional>

可选。(geometry和extent,二选一)。地图范围,示例:{xmin:-180,ymin:-90,xmax:180,ymax:90}。这里extent会转换为geometry

geoFormat String <optional>

可选。(与 geometry或extent并存)。几何类型,wkt、wkb、geojson、自定义等

filter Object <optional>

可选。过滤条件

filter.spatialCondition String <optional>

可选。(spatialCondition和extent,二选一)空间条件

filter.extent String <optional>

可选。(spatialCondition和extent,二选一)空间条件,这里的extent会转换为spatialCondition

filter.timeCondition String <optional>

可选。时间条件

filter.timeCondition.field String <optional>

可选。时间字段

filter.timeCondition.timeRange String <optional>

可选。时间范围

filter.otherProperty String <optional>

可选。其他过滤条件

filter.fieldTag String <optional>

可选。过滤字段标签

fields String <optional>

可选。统计计算中用于分组字段名列表

statisticFields Array <optional>

可选。 统计字段 数组,里面可以包含多个Json数据,每个Json包含field和statisticTypes两个字段,表示某个类型数据的统计方式。示例:{field:"图斑地类面积",statisticTypes:"sum"},表示图斑地类面积求和。其中statisticTypes有count,min,max,mean,sum,variance(方差),stddev(标准差)几种方式。

sref String <optional>

可选。动态投影坐标系 ID,支持 MapGIS 和 EPSG 标准编号,其中 MapGIS 只支持当前库中自带的坐标系的 ID,EPSG 标准请 使用 EPSG:4326 格式,若指定了该参数,则系统认为 geometry 的坐标系为此坐标系

includeProperites Boolean <optional>
false

可选。查询结果中是否包含属性

pageSize Int <optional>
10

可选。每页大小

pageNo Int <optional>
1

可选。页码,从1开始

作者:
  • 基础平台-王魁帅
See:

查看源代码 service/datastore/elasticsearch/ESQueryStats.js, line 13

成员变量

String

# extent

地图范围,示例:{xmin:-180,ymin:-90,xmax:180,ymax:90}。这里extent会转换为geometry

Default Value:
  • null

查看源代码 service/datastore/elasticsearch/ESQueryStats.js, line 73

String

# fields

统计计算中用于分组字段名列表

Default Value:
  • null

查看源代码 service/datastore/elasticsearch/ESQueryStats.js, line 126

Object

# filter

过滤条件

Default Value:
  • null

查看源代码 service/datastore/elasticsearch/ESQueryStats.js, line 95

String

# geoFormat

几何类型,wkt、wkb、geojson、自定义等

Default Value:
  • 'wkt'

查看源代码 service/datastore/elasticsearch/ESQueryStats.js, line 79

String

# geometry

几何信息,圆、多边形等

Default Value:
  • null

查看源代码 service/datastore/elasticsearch/ESQueryStats.js, line 67

Boolean

# includeProperites

查询结果中是否包含属性

Default Value:
  • false

查看源代码 service/datastore/elasticsearch/ESQueryStats.js, line 159

String

# libName

库名称

Default Value:
  • null

查看源代码 service/datastore/elasticsearch/ESQueryStats.js, line 51

Int

# pageNo

页码,从1开始

Default Value:
  • 1

查看源代码 service/datastore/elasticsearch/ESQueryStats.js, line 174

Int

# pageSize

每页大小

Default Value:
  • 10

查看源代码 service/datastore/elasticsearch/ESQueryStats.js, line 167

String

# serviceUrl

es数据查询统计服务地址

Default Value:
  • /datastore/rest/dataset/es/query/

查看源代码 service/datastore/elasticsearch/ESQueryStats.js, line 43

String

# sref

动态投影坐标系 ID

Default Value:
  • null

查看源代码 service/datastore/elasticsearch/ESQueryStats.js, line 151

Array

# statisticFields

统计字段 数组,里面可以包含多个Json数据

Default Value:
  • null

查看源代码 service/datastore/elasticsearch/ESQueryStats.js, line 134

String

# tableName

表名称

Default Value:
  • null

查看源代码 service/datastore/elasticsearch/ESQueryStats.js, line 59

方法

# query(onSuccess, onError)

查询函数,向服务器发送请求,返回geosjon格式数据

参数:
名称 类型 描述
onSuccess function

查询成功回调函数。

onError function

查询失败回调函数。

查看源代码 service/datastore/elasticsearch/ESQueryStats.js, line 202