Elasticsearch Writer: Format Parameters
To access format parameters, open the Feature Type Properties dialog by clicking the properties button on a feature type in the workspace. These parameters are applicable only to the selected feature type.
These parameters apply only to a selected feature type, not to the entire writer.
Tip: If a feature type parameter listed here conflicts with a writer-level parameter, then the writer parameter will be ignored and this feature type parameter will be used.
Table Settings: General
This parameter controls how the feature type handles destination tables. These options are available:
- Create If Needed: Create destination table if it does not exist. The writer uses the information within the FME workspace to automatically create Vector Feature tables as required. All tables will be created when the first input feature is processed. If no features are sent to a feature type, then the corresponding table will not be created.
- Use Existing: If the destination database does not exist, the translation will fail.
Type Mapping Creation
This parameter is a table of geometry fields to create on the type. Each row in the table represents a geometry field that has a name and a type, where the type can be one of:
- geo_point: Geometry is stored as LonLat coordinate pairs. Non-point geometry will be converted to a centroid point.
- geo_shape: Geometry is stored using the GeoJSON specification, so most vector geometry is supported. However, some Elasticsearch spatial functions do not work on geo_shape fields.
To write to particular geometry fields on an Elasticsearch type, features should use Named Geometry. Otherwise geometry will be written to the first field in the table.
Default: name: geometry; type: geo_point
This parameter is only relevant if the database is being created.
This parameter contains a list of fields to store directly within the index. If a field is included in this list, it means that the field’s value can be accessed more quickly by Elasticsearch. However, the index will take more space and may be less efficient.
Fields that are not in this list will be stored and indexed normally.
Advanced
The source of JSON documents to write to the database.
- Feature: Documents will be created from features sent to the Elasticsearch writer (which is the usual behavior).
- JSON Attribute: Documents will be created using JSON directly from an attribute, if possible.
This parameter is enabled when the Document Source is Feature. It can be used to specify an attribute to use as the Document ID. Any features that contain that attribute will use its value as the JSON Document ID.
This parameter is enabled when the Document Source is JSON Attribute. It can be used to specify an attribute to use directly as the document JSON. Any features that contain the JSON attribute will be written using the JSON attribute value. Other features will be written normally.