https://github.com/toyama0919/embulk-output-elasticsearch_ruby
https://github.com/toyama0919/embulk-output-elasticsearch_ruby
elasticsearch embulk ruby
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/toyama0919/embulk-output-elasticsearch_ruby
- Owner: toyama0919
- License: mit
- Created: 2016-11-16T10:57:21.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-27T08:47:37.000Z (about 8 years ago)
- Last Synced: 2025-02-02T08:31:58.930Z (4 months ago)
- Topics: elasticsearch, embulk, ruby
- Language: Ruby
- Size: 24.4 KB
- Stars: 4
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Elasticsearch Ruby output plugin for Embulk
[](http://badge.fury.io/rb/embulk-output-elasticsearch_ruby)
[](http://travis-ci.org/toyama0919/embulk-output-elasticsearch_ruby)Dumps records to Elasticsearch Ruby. Elasticsearch 1.X AND 2.X AND 5.X compatible.
## Overview
* **Plugin type**: output
* **Load all or nothing**: no
* **Resume supported**: no
* **Cleanup supported**: yes## Configuration
- **nodes** nodes (array, default: [{ 'host' => 'localhost', 'port' => 9200 }])
- **host** host (string)
- **port** port (string)
- **request_timeout** request timeout (integer, default: 60)
- **index_type** index type (string)
- **mode** mode (string, default: 'normal')
- **reload_connections** reload connections (bool, default: true)
- **reload_on_failure** reload on failure (bool, default: false)
- **delete_old_index** delete old index (bool, default: false)
- **delete_old_alias** delete old alias (bool, default: true)
- **id_keys** id keys (array, default: nil)
- **id_format** id format (string, default: nil)
- **array_columns** array columns (array, default: nil)
- **bulk_actions** bulk actions (integer, default: 1000)
- **retry_on_failure** retry on failure (integer, default: 5)
- **current_index_name** current index name (string, default: nil)
- **index** index (string, default: 'logstash-%Y.%m.%d')
- **before_delete_index** before delete index (bool, default: false)
- **before_template_name** before template name (string, default: nil)
- **before_template** before template (hash, default: nil)## Example(minimum settings)
```yaml
out:
type: elasticsearch_ruby
nodes:
- {host: localhost, port: 9200}
index_type: page
```## Example(update mode)
```yaml
out:
type: elasticsearch_ruby
nodes:
- {host: {{ env.ES_HOST }}, port: 9200}
index: crawl
index_type: page
bulk_actions: 1000
request_timeout: 60
mode: update
id_format: "%s"
id_keys:
- _id
```## Example(replace mode)
```yaml
out:
type: elasticsearch_ruby
nodes:
- {host: localhost, port: 9200}
index: test_alias
index_type: crawl_companies
mode: replace
delete_old_index: true
before_delete_index: true
bulk_actions: 1000
request_timeout: 60
```* create alias
## Build
```
$ rake
```