From ab55cb33c3174b54953c80904ea3446d6d19fe26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Samami=20=E3=83=83?= Date: Fri, 24 Mar 2017 15:20:40 +0100 Subject: [PATCH] Update README on index configuration --- elasticsearch-model/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/elasticsearch-model/README.md b/elasticsearch-model/README.md index 01ca0cc74..c0280b67a 100644 --- a/elasticsearch-model/README.md +++ b/elasticsearch-model/README.md @@ -365,6 +365,8 @@ response.results.first.title For proper search engine function, it's often necessary to configure the index properly. The `Elasticsearch::Model` integration provides class methods to set up index settings and mappings. +Note: make sure to manually create your index with `MyModel.__elasticsearch__.create_index!` before adding items to your index or ElasticSearch will fallback to creating indexes for you, ignoring any settings provided in your model. + ```ruby class Article settings index: { number_of_shards: 1 } do