Elasticsearch Writer Feature Type Parameters
To access feature type parameters, click the gear icon on a feature type in the workspace to open the Feature Type Parameter Editor. To always display the editor in Workbench, you can select View > Windows > Parameter Editor.
All feature types share similar General Parameters. This includes Name and Writer Name. From here, you can also control Dynamic Properties.
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 only be written if there is exactly one geometry field in the type.
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.