Skip to content

Commit

Permalink
Merge pull request #257 from meilisearch/brunoocasali-patch-1
Browse files Browse the repository at this point in the history
Clarification about synchronization of data
  • Loading branch information
brunoocasali authored May 4, 2023
2 parents dacb52c + be5a0c8 commit 381b628
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ MeiliSearch::Rails.configuration = {

The gem is compatible with [ActiveRecord](https://github.com/rails/rails/tree/master/activerecord), [Mongoid](https://github.com/mongoid/mongoid) and [Sequel](https://github.com/jeremyevans/sequel).

⚠️ Note that even if you want to use all the default options, you must declare an empty `meilisearch` block in your model.

#### Add documents <!-- omit in toc -->

The following code will create a `Book` index and add search capabilities to your `Book` model.
Expand All @@ -123,7 +125,9 @@ class Book < ActiveRecord::Base
end
```

⚠️ Note that even if you want to use all the default options, you must declare an empty `meilisearch` block in your model.
#### Automatic indexing

As soon as you configure your model as mentioned above, `meilisearch-rails` will keep your database table data in sync with your Meilisearch instance using the `ActiveRecord` callbacks automatically.

#### Basic Backend Search <!-- omit in toc -->

Expand Down

0 comments on commit 381b628

Please sign in to comment.