meilisearch-rails 0.12.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +2 -1
- data/lib/meilisearch/rails/version.rb +1 -1
- data/lib/meilisearch-rails.rb +2 -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: 6f0751c88921f9665ac4a8d2f74d401c99eff1e1a82e16831196044725e8b01a
|
4
|
+
data.tar.gz: 4566fa5403529656cb21262456472fc4ec4d4c103ae750d2b48fc9076ff9c03c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1302ec85a68c7774c2d31304738fbaec99845dd5993bfa2d414ac74e1647e833ffa624411670432cce4fb8335766bcfd684d04be4065397ef9d593692f0f080
|
7
|
+
data.tar.gz: 8b45f8cdd06fcf7b75f6d5d5dbffc1266650e69c8a30e49e018ca42f51bf7445b2ef8b357280691bea526628dfc7b0a40f0704f48c9545ba4e2933908e152d3f
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -207,6 +207,7 @@ class Book < ApplicationRecord
|
|
207
207
|
crop_length 10
|
208
208
|
faceting max_values_per_facet: 2000
|
209
209
|
pagination max_total_hits: 1000
|
210
|
+
proximity_precision 'byWord'
|
210
211
|
end
|
211
212
|
end
|
212
213
|
```
|
@@ -230,7 +231,7 @@ harry_book.formatted # => {"id"=>"1", "name"=>"<em>Harry</em> Potter", "descript
|
|
230
231
|
👉 Don't forget that `attributes_to_highlight`, `attributes_to_crop`, and
|
231
232
|
`crop_length` can be set up in the `meilisearch` block of your model.
|
232
233
|
|
233
|
-
|
234
|
+
### 🔍 Sorted search
|
234
235
|
|
235
236
|
As an example of how to use the sort option, here is how you could achieve
|
236
237
|
returning all books sorted by title in ascending order:
|
data/lib/meilisearch-rails.rb
CHANGED
@@ -67,6 +67,7 @@ module MeiliSearch
|
|
67
67
|
pagination
|
68
68
|
faceting
|
69
69
|
typo_tolerance
|
70
|
+
proximity_precision
|
70
71
|
].freeze
|
71
72
|
|
72
73
|
CAMELIZE_OPTIONS = %i[pagination faceting typo_tolerance].freeze
|
@@ -576,7 +577,7 @@ module MeiliSearch
|
|
576
577
|
ms_configurations.filter_map do |options, settings|
|
577
578
|
{
|
578
579
|
synchronous: synchronous || options[:synchronous],
|
579
|
-
index_uid: options
|
580
|
+
index_uid: ms_index_uid(options),
|
580
581
|
primary_key: primary_key
|
581
582
|
}.with_indifferent_access unless ms_indexing_disabled?(options)
|
582
583
|
end
|
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.
|
4
|
+
version: 0.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Meili
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: meilisearch
|