Elastic Elasticsearch Reader/Writer

Licensing optionsfor this format begin with FME Professional Edition.

概述

FME为Elasticsearch集群上的索引提供读写访问。FME将Elasticsearch索引中的每种类型视为特征类型。类型的每个文档都被视为一个功能,文档中的每个字段都被视为属性。

Elasticsearch is an open source full-text search index. Elasticsearch indexes are JSON document stores that supports LonLat or GeoJSON geometry.

More information about Elasticsearch can be found atwww.elastic.co..

Format Usage Notes

  • There are two types of Elasticsearch geometry fields:geo_pointgeo_shape..geo_pointfields can only contain point geometries, whilegeo_shape.fields can contain any geometry that is representable as GeoJSON.
  • You can write features from most coordinate systems, but they will all be reprojected to LL-WGS84 when being converted to GeoJSON.The coordinate reference system for all GeoJSON coordinates is a geographic coordinate reference system, using the World Geodetic System 1984 (WGS 84) [WGS84] datum.[Reference:The GeoJSON Format]
  • Writer: If a non-point geometry is written to ageo_pointgeometry field, then the geometry will be converted to its centroid point before writing.
  • Writer: Each Elasticsearch document has a unique Document ID. This ID can be specified on a feature with an attribute selected in the Writer Feature Type Parameters. If a document with that ID already exists, then the translation will fail.

读者概述

The Elasticsearch reader supports reading multiple types from the same Elasticsearch index. Because of this, a separate reader must be created for each Elasticsearch index.

The types must be defined in the workspace before they can be read.

Multiple Geometry

弹性初搜索读取器支持从相同的弹性型搜索类型读取多个几何领域。如果类型映射中有多个几何字段,则将几何图形读取为FME Multiple Geometry. Each geometry part will be named after the corresponding Elasticsearch geometry field.

Writer Overview

The Elasticsearch writer stores documents into a type associated with a Elasticsearch index. The Elasticsearch writer provides the following capabilities:

类型创建

The Elasticsearch writer uses the information within the FME workspace to automatically create Elasticsearch types as required. A type will be created when the first input feature is processed. If no features are sent to a feature type, then the corresponding type will not be created.

Each Type is created with a Mapping (schema) based on the feature type’s User Attributes. The fields of each JSON document that is written to the Type will be parsed according to that Mapping. If the document contains any fields that do not appear in the Mapping, then those fields will be automatically added to it. This can occur if the Document Source of the feature type is a JSON Attribute.

Overwrite Index

If the Overwrite Index parameter for the writer is set to Yes, then the writer will drop and re-create the index before writing any features to it.

在处理第一个输入功能时,将覆盖索引。如果没有将功能发送到任何写入器的功能类型,则不会覆盖相应的索引。

Multiple Geometry

The Elasticsearch reader supports writing to multiple geometry fields in the same Elasticsearch type.

If there is more than one geometry field in the existing type mapping, then a feature's geometry must have the same name as destination Elasticsearch geometry field. Otherwise, no geometry will be written.

If a feature's FME Multiple Geometry has multiple parts, then each part can be written to a different Elasticsearch geometry field. Each part will be written to the Elasticsearch geometry field corresponding to its geometry part name, provided that the field exists.

Nested geometry fields can be created and/or written to by naming the geometry in the form:

.

For example, ageo_pointgeometry field calledaddress.locationwould result in data similar to the following:

{

“address”: {

“location”: [ , ]

}

}

FME知识中心

Search Elasticsearch