indexing - configure an elasticsearch index with json not taking -
i'm using following json configure elasticsearch. goal set index , type in 1 swoop (this requirement, setting docker images). far i've gotten allow elasticsearch start successfully. problem index isn't created yet doesn't error. other forms i've tried prevents service starting.
{ "cluster": { "name": "myclustername" }, "node": { "name": "mynodename" }, "indices": { "number_of_shards": 4, "index.number_of_replicas": 4 }, "index": { "analysis": { "analyzer": { "my_ngram_analyzer": { "tokenizer": "my_ngram_tokenizer", "filter": "lowercase" }, "my_lowercase_whitespace_analyzer": { "tokenizer": "whitespace", "filter": "lowercase" } }, "tokenizer": { "my_ngram_tokenizer": { "type": "ngram", "min_gram": "2", "max_gram": "20" } } }, "index": { "settings": { "_id": "indexindexer" }, "mappings": { "inventoryindex": { "_id": { "path": "indexname" }, "_routing": { "required": true, "path": "indexname" }, "properties": { "indexname": { "type": "string", "index": "not_analyzed" }, "startedon": { "type": "date", "index": "not_analyzed" }, "deleted": { "type": "boolean", "index": "not_analyzed" }, "deletedon": { "type": "date", "index": "not_analyzed" }, "archived": { "type": "boolean", "index": "not_analyzed" }, "archivedon": { "type": "date", "index": "not_analyzed" }, "failure": { "type": "boolean", "index": "not_analyzed" }, "failureon": { "type": "date", "index": "not_analyzed" } } } } } } } i may have workaround using curl in post-boot script prefer have configuration handled in config file.
thanks!
it appears elasticsearch not allow configuration done in single yml. workaround i've found create index template , place in <es-config>/templates/ dir after spinning service use curl create index. index matching catch , provision according template.
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-templates.html
Comments
Post a Comment