Skip to content

Update README on index configuration #686

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

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 2 additions & 0 deletions elasticsearch-model/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down