-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for user configured mapping and settings
- Loading branch information
1 parent
110bb95
commit dcfbbca
Showing
3 changed files
with
100 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,15 +22,42 @@ gems: | |
|
||
## Configuration | ||
|
||
``` | ||
```yaml | ||
elasticsearch: | ||
url: "http://localhost:9200/" # Required. Supports auth and SSL: https://user:[email protected] | ||
# Can also read URLs stored in environment variable named | ||
# BONSAI_URL and ELASTICSEARCH_URL. | ||
number_of_shards: 1 # Optional. Default is 1 primary shard. | ||
number_of_replicas: 1 # Optional. Default is 1 replica. | ||
index_name: "jekyll" # Optional. Default is "jekyll". | ||
default_type: "post" # Optional. Default type is "post". | ||
url: "http://localhost:9200/" # Required. Supports auth and SSL: https://user:[email protected] | ||
# Can also read URLs stored in environment variable named | ||
# BONSAI_URL and ELASTICSEARCH_URL. | ||
number_of_shards: 1 # Optional. Default is 1 primary shard. | ||
number_of_replicas: 1 # Optional. Default is 1 replica. | ||
index_name: "jekyll" # Optional. Default is "jekyll". | ||
default_type: "post" # Optional. Default type is "post". | ||
custom_settings: _es_settings.yml # Optional. No default. Relative to your src folder | ||
custom_mappings: _es_mappings.yml # Optional. No default. Relative to your src folder | ||
``` | ||
### Custom Settings File Example | ||
It should be written to be plugged into the `settings` slot of a [create index](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html) call | ||
|
||
```yaml | ||
analysis: | ||
analyzer: | ||
stop_analyzer: | ||
type: stop | ||
stopwords: _english_ | ||
index: | ||
number_of_shards: 1 | ||
number_of_replicas: 0 | ||
``` | ||
|
||
### Custom Mappings File Example | ||
|
||
It should be written to be plugged into the `mappings.[type]` slot of a [create index](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html) call | ||
|
||
```yaml | ||
properties: | ||
field1: | ||
type: text | ||
``` | ||
|
||
## Development | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters