Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: write_operation docs #603

Merged
merged 1 commit into from
Jan 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions pipeline/outputs/elasticsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ The **es** output plugin, allows to ingest your records into an [Elasticsearch](
| Tag\_Key | When Include\_Tag\_Key is enabled, this property defines the key name for the tag. | \_flb-key |
| Generate\_ID | When enabled, generate `_id` for outgoing records. This prevents duplicate records when retrying ES. | Off |
| Id\_Key | If set, `_id` will be the value of the key from incoming record and `Generate_ID` option is ignored. | |
| Write\_Operation | The write\_operation can be any of: index (default), create, update, upsert. | index |
| Replace\_Dots | When enabled, replace field name dots with underscore, required by Elasticsearch 2.0-2.3. | Off |
| Trace\_Output | When enabled print the elasticsearch API calls to stdout \(for diag only\) | Off |
| Trace\_Error | When enabled print the elasticsearch API calls to stdout when elasticsearch returns an error \(for diag only\) | Off |
Expand All @@ -49,6 +50,19 @@ The **es** output plugin, allows to ingest your records into an [Elasticsearch](

Elasticsearch output plugin supports TTL/SSL, for more details about the properties available and general configuration, please refer to the [TLS/SSL](tcp-and-tls.md) section.

### write\_operation

The write\_operation can be any of:

| Operation | Description |
| ------------- | ----------- |
| index (default) | new data is added while existing data (based on its id) is replaced (reindexed).|
| create | adds new data - if the data already exists (based on its id), the op is skipped.|
| update | updates existing data (based on its id). If no data is found, the op is skipped.|
| upsert | known as merge or insert if the data does not exist, updates if the data exists (based on its id).|

**Please note, id is required in create, update, and upsert scenario. Without id, the message will be dropped.**

## Getting Started

In order to insert records into a Elasticsearch service, you can run the plugin from the command line or through the configuration file:
Expand Down