spree_meilisearch 6.0.3 → 6.0.4
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/app/models/spree_meilisearch/search_provider.rb +14 -11
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 58ed80828f8995ceff98c207f57eedbd26cfd41d5979ecc40669d38766dd39a0
|
|
4
|
+
data.tar.gz: 6b3d1cd6b2e4f9fc0caa4280b68c3ed1732760b46d85feb7a5d4f3190ebcb2b4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6a88d6dbc1b7bc21ae6ddf294c284229f0c737e228212a3a9775159e4258ea6cfc30d68f91bf5cb34e89a7eed9cd8192a0c5db1f97c5f742b89cc8c15b747ed2
|
|
7
|
+
data.tar.gz: 126a9d77b5e2502075dff62f266efdc41b37547a282c1e21c31e5b80f388e56fcd23172819bfbafabf728747f546e7cfdb7d917c2ca719a05c8fbbe0c8a1cbf1
|
|
@@ -149,6 +149,14 @@ module SpreeMeilisearch
|
|
|
149
149
|
ensure_index_settings!
|
|
150
150
|
end
|
|
151
151
|
|
|
152
|
+
# The index is the storefront's: shoppers search it and the back office
|
|
153
|
+
# never does, so its vocabulary is the storefront schema whatever audience
|
|
154
|
+
# this provider was built for. A back-office reindex must not teach the
|
|
155
|
+
# shared index about admin-only fields.
|
|
156
|
+
def custom_field_schema
|
|
157
|
+
@custom_field_schema ||= storefront_custom_field_schema
|
|
158
|
+
end
|
|
159
|
+
|
|
152
160
|
private
|
|
153
161
|
|
|
154
162
|
# Normalize incoming filters to a plain, string-keyed Hash.
|
|
@@ -202,7 +210,7 @@ module SpreeMeilisearch
|
|
|
202
210
|
facets: return_facets ? facet_attributes : nil,
|
|
203
211
|
sort: build_sort(sort),
|
|
204
212
|
page: page,
|
|
205
|
-
|
|
213
|
+
hits_per_page: limit
|
|
206
214
|
}.compact
|
|
207
215
|
|
|
208
216
|
Rails.logger.debug { "[Meilisearch] index=#{index_name} query=#{query.inspect} #{search_params.compact.inspect}" }
|
|
@@ -210,11 +218,14 @@ module SpreeMeilisearch
|
|
|
210
218
|
settings_refreshed = false
|
|
211
219
|
begin
|
|
212
220
|
if return_facets && grouped_options.any?
|
|
213
|
-
queries = [{
|
|
221
|
+
queries = [{ index_uid: index_name, q: query.to_s, **search_params }]
|
|
214
222
|
option_type_ids_ordered = grouped_options.keys
|
|
215
223
|
option_type_ids_ordered.each do |option_type_id|
|
|
216
224
|
without_this = build_grouped_option_conditions(grouped_options.except(option_type_id))
|
|
217
|
-
queries << {
|
|
225
|
+
queries << {
|
|
226
|
+
index_uid: index_name, q: query.to_s, filter: base_conditions + without_this,
|
|
227
|
+
facets: ['option_value_ids'], page: 1, hits_per_page: 0
|
|
228
|
+
}
|
|
218
229
|
end
|
|
219
230
|
|
|
220
231
|
results = client.multi_search(queries)
|
|
@@ -285,14 +296,6 @@ module SpreeMeilisearch
|
|
|
285
296
|
"#{store.code}_products"
|
|
286
297
|
end
|
|
287
298
|
|
|
288
|
-
# The index is the storefront's: shoppers search it and the back office
|
|
289
|
-
# never does, so its vocabulary is the storefront schema whatever audience
|
|
290
|
-
# this provider was built for. A back-office reindex must not teach the
|
|
291
|
-
# shared index about admin-only fields.
|
|
292
|
-
def custom_field_schema
|
|
293
|
-
@custom_field_schema ||= storefront_custom_field_schema
|
|
294
|
-
end
|
|
295
|
-
|
|
296
299
|
def storefront_custom_field_schema
|
|
297
300
|
Spree::SearchProvider::CustomFieldSchema.new(store, audience: :store)
|
|
298
301
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spree_meilisearch
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.0.
|
|
4
|
+
version: 6.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vendo Connect Inc.
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-11-
|
|
12
|
+
date: 2026-11-12 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: meilisearch
|
|
@@ -31,14 +31,14 @@ dependencies:
|
|
|
31
31
|
requirements:
|
|
32
32
|
- - '='
|
|
33
33
|
- !ruby/object:Gem::Version
|
|
34
|
-
version: 6.0.
|
|
34
|
+
version: 6.0.4
|
|
35
35
|
type: :runtime
|
|
36
36
|
prerelease: false
|
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
|
38
38
|
requirements:
|
|
39
39
|
- - '='
|
|
40
40
|
- !ruby/object:Gem::Version
|
|
41
|
-
version: 6.0.
|
|
41
|
+
version: 6.0.4
|
|
42
42
|
description: Instant product search, filtering and faceted navigation for Spree via
|
|
43
43
|
Meilisearch
|
|
44
44
|
email: hello@spreecommerce.org
|
|
@@ -58,9 +58,9 @@ licenses:
|
|
|
58
58
|
- MIT
|
|
59
59
|
metadata:
|
|
60
60
|
bug_tracker_uri: https://github.com/spree/spree/issues
|
|
61
|
-
changelog_uri: https://github.com/spree/spree/releases/tag/v6.0.
|
|
61
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v6.0.4
|
|
62
62
|
documentation_uri: https://spreecommerce.org/docs/
|
|
63
|
-
source_code_uri: https://github.com/spree/spree/tree/v6.0.
|
|
63
|
+
source_code_uri: https://github.com/spree/spree/tree/v6.0.4
|
|
64
64
|
post_install_message:
|
|
65
65
|
rdoc_options: []
|
|
66
66
|
require_paths:
|