meilisearch-rails 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +5 -6
- data/lib/meilisearch/pagination/kaminari.rb +5 -1
- data/lib/meilisearch/version.rb +1 -1
- data/lib/meilisearch-rails.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9eae547864046ca0beb6cf7de6fa4458ff7449d9ba9c6d4ac4172d221cb8de3b
|
|
4
|
+
data.tar.gz: acbed5cdbf3c63c68c39fef9d3e24620dd14ef5c47d6eabb5da7e96d57dd1a98
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a9b0017613ec9bf55fae9d4cb2e847a841d84078968a57d1940425e10ad5062ce747ee888837efd75b9b8826136dec52fd283759d05cbdaae7cc5b9eb237d1c7
|
|
7
|
+
data.tar.gz: fd67c80baf0598425ef427ec50a6a849e736a704439e0eab67c29175979d4b69b26d1f15a97421ffec204a2dd047bc5f045dafd690e179c9a5eab2be05ab7b99
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -65,7 +65,7 @@ To learn more about MeiliSearch, check out our [Documentation](https://docs.meil
|
|
|
65
65
|
|
|
66
66
|
## 🤖 Compatibility with MeiliSearch
|
|
67
67
|
|
|
68
|
-
This package only guarantees the compatibility with the [version v0.
|
|
68
|
+
This package only guarantees the compatibility with the [version v0.21.0 of MeiliSearch](https://github.com/meilisearch/MeiliSearch/releases/tag/v0.21.0).
|
|
69
69
|
|
|
70
70
|
## 🔧 Installation
|
|
71
71
|
|
|
@@ -207,13 +207,12 @@ class Book < ApplicationRecord
|
|
|
207
207
|
|
|
208
208
|
meilisearch do
|
|
209
209
|
searchable_attributes [:title, :author, :publisher, :description]
|
|
210
|
-
|
|
210
|
+
filterable_attributes [:genre]
|
|
211
211
|
ranking_rules [
|
|
212
212
|
'proximity',
|
|
213
213
|
'typo',
|
|
214
214
|
'words',
|
|
215
215
|
'attribute',
|
|
216
|
-
'wordsPosition',
|
|
217
216
|
'exactness',
|
|
218
217
|
'desc(publication_year)'
|
|
219
218
|
]
|
|
@@ -234,7 +233,7 @@ Check the dedicated section of the documentation, for more information on the [s
|
|
|
234
233
|
All the supported options are described in the [search parameters](https://docs.meilisearch.com/reference/features/search_parameters.html) section of the documentation.
|
|
235
234
|
|
|
236
235
|
```ruby
|
|
237
|
-
Book.search('Harry',
|
|
236
|
+
Book.search('Harry', attributesToHighlight: ['*'])
|
|
238
237
|
```
|
|
239
238
|
👉 Don't forget that `attributes_to_highlight`, `attributes_to_crop`, and
|
|
240
239
|
`crop_length` can be set up in the `meilisearch` block of your model.
|
|
@@ -284,13 +283,13 @@ class Author < ApplicationRecord
|
|
|
284
283
|
meilisearch do
|
|
285
284
|
attribute :first_name, :last_name
|
|
286
285
|
attribute :full_name do
|
|
287
|
-
|
|
286
|
+
"#{first_name} #{last_name}"
|
|
288
287
|
end
|
|
289
288
|
add_attribute :full_name_reversed
|
|
290
289
|
end
|
|
291
290
|
|
|
292
291
|
def full_name_reversed
|
|
293
|
-
|
|
292
|
+
"#{last_name} #{first_name}"
|
|
294
293
|
end
|
|
295
294
|
|
|
296
295
|
def will_save_change_to_full_name?
|
data/lib/meilisearch/version.rb
CHANGED
data/lib/meilisearch-rails.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: meilisearch-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Meili
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-08-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|