README.md in meilisearch-rails-0.8.0 vs README.md in meilisearch-rails-0.8.1
- old
+ new
@@ -5,11 +5,11 @@
<h1 align="center">Meilisearch Rails</h1>
<h4 align="center">
<a href="https://github.com/meilisearch/meilisearch">Meilisearch</a> |
<a href="https://docs.meilisearch.com">Documentation</a> |
- <a href="https://slack.meilisearch.com">Slack</a> |
+ <a href="https://discord.meilisearch.com">Discord</a> |
<a href="https://roadmap.meilisearch.com/tabs/1-under-consideration">Roadmap</a> |
<a href="https://www.meilisearch.com">Website</a> |
<a href="https://docs.meilisearch.com/faq">FAQ</a>
</h4>
@@ -60,11 +60,11 @@
To learn more about Meilisearch, check out our [Documentation](https://docs.meilisearch.com/learn/tutorials/getting_started.html) or our [API References](https://docs.meilisearch.com/reference/api/).
## 🤖 Compatibility with Meilisearch
-This package only guarantees the compatibility with the [version v0.30.0 of Meilisearch](https://github.com/meilisearch/meilisearch/releases/tag/v0.30.0).
+This package only guarantees the compatibility with the [version v1.0.0 of Meilisearch](https://github.com/meilisearch/meilisearch/releases/tag/v1.0.0).
## 🔧 Installation <!-- omit in toc -->
This package requires Ruby version 2.6.0 or later and Rails 5.2 or later.
@@ -197,9 +197,16 @@
All the supported options are described in the [search parameters](https://docs.meilisearch.com/reference/features/search_parameters.html) section of the documentation.
```ruby
Book.search('Harry', attributes_to_highlight: ['*'])
```
+
+Then it's possible to retrieve the highlighted or cropped value by using the `formatted` method available in the object.
+
+```ruby
+harry_book.formatted # => {"id"=>"1", "name"=>"<em>Harry</em> Potter", "description"=>…
+```
+
👉 Don't forget that `attributes_to_highlight`, `attributes_to_crop`, and
`crop_length` can be set up in the `meilisearch` block of your model.
## 🔍 Sorted search