algolia 3.42.1 → 3.42.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/.github/workflows/do-not-edit-this-repository.yml +1 -1
- data/.github/workflows/release.yml +2 -2
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +4 -4
- data/lib/algolia/models/recommend/fallback_params.rb +4 -46
- data/lib/algolia/models/recommend/recommend_search_params.rb +15 -49
- data/lib/algolia/version.rb +1 -1
- metadata +1 -2
- data/lib/algolia/models/recommend/facet_filters.rb +0 -109
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d61077a66bcc7105679f9ed7dcd6b1a4a4ed67b5f10e751604d271382b300a70
|
|
4
|
+
data.tar.gz: 808ddcec7d187c1a992dc0be37f3b1bc595b1e533b30a9cd6909946a36e041b9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c944074227fd43acaf224ead099d48c079316bf98a66afa793e1ac7b84810a0f5a1823f5433ec488df788c2a4cc10efdf4d29134f53f6541f508f4ee359d4637
|
|
7
|
+
data.tar.gz: 1386f223055c7d8a511283a94647ac8c27995451584c12febb9211d6f6ccee1c42faa2cc59fe24b069bafa64847de6d826d8ec8c971f2ebd5d302c627c1a7b7c
|
|
@@ -16,12 +16,12 @@ jobs:
|
|
|
16
16
|
id-token: write
|
|
17
17
|
contents: write
|
|
18
18
|
steps:
|
|
19
|
-
- uses: actions/checkout@
|
|
19
|
+
- uses: actions/checkout@v7
|
|
20
20
|
|
|
21
21
|
- name: Install Ruby
|
|
22
22
|
uses: ruby/setup-ruby@v1
|
|
23
23
|
with:
|
|
24
|
-
ruby-version: 4.0.
|
|
24
|
+
ruby-version: 4.0.5
|
|
25
25
|
bundler-cache: true
|
|
26
26
|
|
|
27
27
|
- uses: rubygems/release-gem@e9a6361a0b14562539327c2a02373edc56dd3169
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [3.42.2](https://github.com/algolia/algoliasearch-client-ruby/compare/3.42.1...3.42.2)
|
|
2
|
+
|
|
3
|
+
- [035c03ecad](https://github.com/algolia/api-clients-automation/commit/035c03ecad) fix(specs): BREAKING CHANGE – remove recommend query params overridden by the API ([#6604](https://github.com/algolia/api-clients-automation/pull/6604)) by [@raed667](https://github.com/raed667/)
|
|
4
|
+
- The `ranking`, `facetFilters`, and `enableABTest` parameters have been removed from the Recommend request, and `enableRules` from its fallback parameters, as the Recommend API ignores them. API behavior is unchanged, but code setting these fields must be updated.
|
|
5
|
+
- [5031c65633](https://github.com/algolia/api-clients-automation/commit/5031c65633) chore(deps): dependencies 2026-06-15 ([#6508](https://github.com/algolia/api-clients-automation/pull/6508)) by [@algolia-api-clients-automation-bot[bot]](https://github.com/apps/algolia-api-clients-automation-bot)
|
|
6
|
+
|
|
1
7
|
## [3.42.1](https://github.com/algolia/algoliasearch-client-ruby/compare/3.42.0...3.42.1)
|
|
2
8
|
|
|
3
9
|
- [a676cd9cef](https://github.com/algolia/api-clients-automation/commit/a676cd9cef) fix(clients): bump replaceAllObjects default maxRetries from 100 to 800 ([#6580](https://github.com/algolia/api-clients-automation/pull/6580)) by [@Fluf22](https://github.com/Fluf22/)
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
algolia (3.42.
|
|
4
|
+
algolia (3.42.2)
|
|
5
5
|
base64 (>= 0.2.0, < 1)
|
|
6
6
|
faraday (>= 1.0.1, < 3.0)
|
|
7
7
|
faraday-net_http_persistent (>= 0.15, < 3)
|
|
@@ -12,16 +12,16 @@ GEM
|
|
|
12
12
|
specs:
|
|
13
13
|
base64 (0.3.0)
|
|
14
14
|
connection_pool (2.5.4)
|
|
15
|
-
faraday (2.14.
|
|
15
|
+
faraday (2.14.3)
|
|
16
16
|
faraday-net_http (>= 2.0, < 3.5)
|
|
17
17
|
json
|
|
18
18
|
logger
|
|
19
|
-
faraday-net_http (3.4.
|
|
19
|
+
faraday-net_http (3.4.4)
|
|
20
20
|
net-http (~> 0.5)
|
|
21
21
|
faraday-net_http_persistent (2.3.1)
|
|
22
22
|
faraday (~> 2.5)
|
|
23
23
|
net-http-persistent (>= 4.0.4, < 5)
|
|
24
|
-
json (2.
|
|
24
|
+
json (2.20.0)
|
|
25
25
|
logger (1.7.0)
|
|
26
26
|
net-http (0.9.1)
|
|
27
27
|
uri (>= 0.11.1)
|
|
@@ -7,6 +7,7 @@ require "time"
|
|
|
7
7
|
|
|
8
8
|
module Algolia
|
|
9
9
|
module Recommend
|
|
10
|
+
# Search parameters to use for a fallback request if there aren't enough recommendations.
|
|
10
11
|
class FallbackParams
|
|
11
12
|
# Keywords to be used instead of the search query to conduct a more broader search Using the `similarQuery` parameter changes other settings - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords` Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results.
|
|
12
13
|
attr_accessor :similar_query
|
|
@@ -14,8 +15,6 @@ module Algolia
|
|
|
14
15
|
# Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>`, where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>`, where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes if the facet attribute name or facet value contains spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering).
|
|
15
16
|
attr_accessor :filters
|
|
16
17
|
|
|
17
|
-
attr_accessor :facet_filters
|
|
18
|
-
|
|
19
18
|
attr_accessor :optional_filters
|
|
20
19
|
|
|
21
20
|
attr_accessor :numeric_filters
|
|
@@ -82,9 +81,6 @@ module Algolia
|
|
|
82
81
|
# Whether to include this search when calculating processing-time percentiles.
|
|
83
82
|
attr_accessor :percentile_computation
|
|
84
83
|
|
|
85
|
-
# Whether to enable A/B testing for this search.
|
|
86
|
-
attr_accessor :enable_ab_test
|
|
87
|
-
|
|
88
84
|
# Search query.
|
|
89
85
|
attr_accessor :query
|
|
90
86
|
|
|
@@ -151,9 +147,6 @@ module Algolia
|
|
|
151
147
|
# Attributes to include in the API response To reduce the size of your response, you can retrieve only some of the attributes. Attribute names are case-sensitive - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included.
|
|
152
148
|
attr_accessor :attributes_to_retrieve
|
|
153
149
|
|
|
154
|
-
# Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute), you put the sorting attribute at the top of the list. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. Before you modify the default setting, test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing).
|
|
155
|
-
attr_accessor :ranking
|
|
156
|
-
|
|
157
150
|
# Relevancy threshold below which less relevant results aren't included in the results You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results.
|
|
158
151
|
attr_accessor :relevancy_strictness
|
|
159
152
|
|
|
@@ -199,9 +192,6 @@ module Algolia
|
|
|
199
192
|
# Whether to split compound words in the query into their building blocks For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. Decompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).
|
|
200
193
|
attr_accessor :decompound_query
|
|
201
194
|
|
|
202
|
-
# Whether to enable rules.
|
|
203
|
-
attr_accessor :enable_rules
|
|
204
|
-
|
|
205
195
|
# Whether to enable Personalization.
|
|
206
196
|
attr_accessor :enable_personalization
|
|
207
197
|
|
|
@@ -257,7 +247,6 @@ module Algolia
|
|
|
257
247
|
{
|
|
258
248
|
:similar_query => :similarQuery,
|
|
259
249
|
:filters => :filters,
|
|
260
|
-
:facet_filters => :facetFilters,
|
|
261
250
|
:optional_filters => :optionalFilters,
|
|
262
251
|
:numeric_filters => :numericFilters,
|
|
263
252
|
:tag_filters => :tagFilters,
|
|
@@ -282,7 +271,6 @@ module Algolia
|
|
|
282
271
|
:analytics => :analytics,
|
|
283
272
|
:analytics_tags => :analyticsTags,
|
|
284
273
|
:percentile_computation => :percentileComputation,
|
|
285
|
-
:enable_ab_test => :enableABTest,
|
|
286
274
|
:query => :query,
|
|
287
275
|
:attributes_for_faceting => :attributesForFaceting,
|
|
288
276
|
:replicas => :replicas,
|
|
@@ -305,7 +293,6 @@ module Algolia
|
|
|
305
293
|
:keep_diacritics_on_characters => :keepDiacriticsOnCharacters,
|
|
306
294
|
:custom_ranking => :customRanking,
|
|
307
295
|
:attributes_to_retrieve => :attributesToRetrieve,
|
|
308
|
-
:ranking => :ranking,
|
|
309
296
|
:relevancy_strictness => :relevancyStrictness,
|
|
310
297
|
:attributes_to_highlight => :attributesToHighlight,
|
|
311
298
|
:attributes_to_snippet => :attributesToSnippet,
|
|
@@ -322,7 +309,6 @@ module Algolia
|
|
|
322
309
|
:remove_stop_words => :removeStopWords,
|
|
323
310
|
:query_languages => :queryLanguages,
|
|
324
311
|
:decompound_query => :decompoundQuery,
|
|
325
|
-
:enable_rules => :enableRules,
|
|
326
312
|
:enable_personalization => :enablePersonalization,
|
|
327
313
|
:query_type => :queryType,
|
|
328
314
|
:remove_words_if_no_results => :removeWordsIfNoResults,
|
|
@@ -350,7 +336,6 @@ module Algolia
|
|
|
350
336
|
{
|
|
351
337
|
:similar_query => :"String",
|
|
352
338
|
:filters => :"String",
|
|
353
|
-
:facet_filters => :"FacetFilters",
|
|
354
339
|
:optional_filters => :"OptionalFilters",
|
|
355
340
|
:numeric_filters => :"NumericFilters",
|
|
356
341
|
:tag_filters => :"TagFilters",
|
|
@@ -375,7 +360,6 @@ module Algolia
|
|
|
375
360
|
:analytics => :"Boolean",
|
|
376
361
|
:analytics_tags => :"Array<String>",
|
|
377
362
|
:percentile_computation => :"Boolean",
|
|
378
|
-
:enable_ab_test => :"Boolean",
|
|
379
363
|
:query => :"String",
|
|
380
364
|
:attributes_for_faceting => :"Array<String>",
|
|
381
365
|
:replicas => :"Array<String>",
|
|
@@ -398,7 +382,6 @@ module Algolia
|
|
|
398
382
|
:keep_diacritics_on_characters => :"String",
|
|
399
383
|
:custom_ranking => :"Array<String>",
|
|
400
384
|
:attributes_to_retrieve => :"Array<String>",
|
|
401
|
-
:ranking => :"Array<String>",
|
|
402
385
|
:relevancy_strictness => :"Integer",
|
|
403
386
|
:attributes_to_highlight => :"Array<String>",
|
|
404
387
|
:attributes_to_snippet => :"Array<String>",
|
|
@@ -415,7 +398,6 @@ module Algolia
|
|
|
415
398
|
:remove_stop_words => :"RemoveStopWords",
|
|
416
399
|
:query_languages => :"Array<SupportedLanguage>",
|
|
417
400
|
:decompound_query => :"Boolean",
|
|
418
|
-
:enable_rules => :"Boolean",
|
|
419
401
|
:enable_personalization => :"Boolean",
|
|
420
402
|
:query_type => :"QueryType",
|
|
421
403
|
:remove_words_if_no_results => :"RemoveWordsIfNoResults",
|
|
@@ -453,7 +435,9 @@ module Algolia
|
|
|
453
435
|
# List of class defined in allOf (OpenAPI v3)
|
|
454
436
|
def self.openapi_all_of
|
|
455
437
|
[
|
|
456
|
-
:"
|
|
438
|
+
:"BaseRecommendSearchParams",
|
|
439
|
+
:"RecommendIndexSettings",
|
|
440
|
+
:"SearchParamsQuery"
|
|
457
441
|
]
|
|
458
442
|
end
|
|
459
443
|
|
|
@@ -488,10 +472,6 @@ module Algolia
|
|
|
488
472
|
self.filters = attributes[:filters]
|
|
489
473
|
end
|
|
490
474
|
|
|
491
|
-
if attributes.key?(:facet_filters)
|
|
492
|
-
self.facet_filters = attributes[:facet_filters]
|
|
493
|
-
end
|
|
494
|
-
|
|
495
475
|
if attributes.key?(:optional_filters)
|
|
496
476
|
self.optional_filters = attributes[:optional_filters]
|
|
497
477
|
end
|
|
@@ -600,10 +580,6 @@ module Algolia
|
|
|
600
580
|
self.percentile_computation = attributes[:percentile_computation]
|
|
601
581
|
end
|
|
602
582
|
|
|
603
|
-
if attributes.key?(:enable_ab_test)
|
|
604
|
-
self.enable_ab_test = attributes[:enable_ab_test]
|
|
605
|
-
end
|
|
606
|
-
|
|
607
583
|
if attributes.key?(:query)
|
|
608
584
|
self.query = attributes[:query]
|
|
609
585
|
end
|
|
@@ -718,12 +694,6 @@ module Algolia
|
|
|
718
694
|
end
|
|
719
695
|
end
|
|
720
696
|
|
|
721
|
-
if attributes.key?(:ranking)
|
|
722
|
-
if (value = attributes[:ranking]).is_a?(Array)
|
|
723
|
-
self.ranking = value
|
|
724
|
-
end
|
|
725
|
-
end
|
|
726
|
-
|
|
727
697
|
if attributes.key?(:relevancy_strictness)
|
|
728
698
|
self.relevancy_strictness = attributes[:relevancy_strictness]
|
|
729
699
|
end
|
|
@@ -796,10 +766,6 @@ module Algolia
|
|
|
796
766
|
self.decompound_query = attributes[:decompound_query]
|
|
797
767
|
end
|
|
798
768
|
|
|
799
|
-
if attributes.key?(:enable_rules)
|
|
800
|
-
self.enable_rules = attributes[:enable_rules]
|
|
801
|
-
end
|
|
802
|
-
|
|
803
769
|
if attributes.key?(:enable_personalization)
|
|
804
770
|
self.enable_personalization = attributes[:enable_personalization]
|
|
805
771
|
end
|
|
@@ -892,7 +858,6 @@ module Algolia
|
|
|
892
858
|
self.class == other.class &&
|
|
893
859
|
similar_query == other.similar_query &&
|
|
894
860
|
filters == other.filters &&
|
|
895
|
-
facet_filters == other.facet_filters &&
|
|
896
861
|
optional_filters == other.optional_filters &&
|
|
897
862
|
numeric_filters == other.numeric_filters &&
|
|
898
863
|
tag_filters == other.tag_filters &&
|
|
@@ -917,7 +882,6 @@ module Algolia
|
|
|
917
882
|
analytics == other.analytics &&
|
|
918
883
|
analytics_tags == other.analytics_tags &&
|
|
919
884
|
percentile_computation == other.percentile_computation &&
|
|
920
|
-
enable_ab_test == other.enable_ab_test &&
|
|
921
885
|
query == other.query &&
|
|
922
886
|
attributes_for_faceting == other.attributes_for_faceting &&
|
|
923
887
|
replicas == other.replicas &&
|
|
@@ -940,7 +904,6 @@ module Algolia
|
|
|
940
904
|
keep_diacritics_on_characters == other.keep_diacritics_on_characters &&
|
|
941
905
|
custom_ranking == other.custom_ranking &&
|
|
942
906
|
attributes_to_retrieve == other.attributes_to_retrieve &&
|
|
943
|
-
ranking == other.ranking &&
|
|
944
907
|
relevancy_strictness == other.relevancy_strictness &&
|
|
945
908
|
attributes_to_highlight == other.attributes_to_highlight &&
|
|
946
909
|
attributes_to_snippet == other.attributes_to_snippet &&
|
|
@@ -957,7 +920,6 @@ module Algolia
|
|
|
957
920
|
remove_stop_words == other.remove_stop_words &&
|
|
958
921
|
query_languages == other.query_languages &&
|
|
959
922
|
decompound_query == other.decompound_query &&
|
|
960
|
-
enable_rules == other.enable_rules &&
|
|
961
923
|
enable_personalization == other.enable_personalization &&
|
|
962
924
|
query_type == other.query_type &&
|
|
963
925
|
remove_words_if_no_results == other.remove_words_if_no_results &&
|
|
@@ -991,7 +953,6 @@ module Algolia
|
|
|
991
953
|
[
|
|
992
954
|
similar_query,
|
|
993
955
|
filters,
|
|
994
|
-
facet_filters,
|
|
995
956
|
optional_filters,
|
|
996
957
|
numeric_filters,
|
|
997
958
|
tag_filters,
|
|
@@ -1016,7 +977,6 @@ module Algolia
|
|
|
1016
977
|
analytics,
|
|
1017
978
|
analytics_tags,
|
|
1018
979
|
percentile_computation,
|
|
1019
|
-
enable_ab_test,
|
|
1020
980
|
query,
|
|
1021
981
|
attributes_for_faceting,
|
|
1022
982
|
replicas,
|
|
@@ -1039,7 +999,6 @@ module Algolia
|
|
|
1039
999
|
keep_diacritics_on_characters,
|
|
1040
1000
|
custom_ranking,
|
|
1041
1001
|
attributes_to_retrieve,
|
|
1042
|
-
ranking,
|
|
1043
1002
|
relevancy_strictness,
|
|
1044
1003
|
attributes_to_highlight,
|
|
1045
1004
|
attributes_to_snippet,
|
|
@@ -1056,7 +1015,6 @@ module Algolia
|
|
|
1056
1015
|
remove_stop_words,
|
|
1057
1016
|
query_languages,
|
|
1058
1017
|
decompound_query,
|
|
1059
|
-
enable_rules,
|
|
1060
1018
|
enable_personalization,
|
|
1061
1019
|
query_type,
|
|
1062
1020
|
remove_words_if_no_results,
|
|
@@ -15,8 +15,6 @@ module Algolia
|
|
|
15
15
|
# Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>`, where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>`, where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes if the facet attribute name or facet value contains spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering).
|
|
16
16
|
attr_accessor :filters
|
|
17
17
|
|
|
18
|
-
attr_accessor :facet_filters
|
|
19
|
-
|
|
20
18
|
attr_accessor :optional_filters
|
|
21
19
|
|
|
22
20
|
attr_accessor :numeric_filters
|
|
@@ -83,9 +81,6 @@ module Algolia
|
|
|
83
81
|
# Whether to include this search when calculating processing-time percentiles.
|
|
84
82
|
attr_accessor :percentile_computation
|
|
85
83
|
|
|
86
|
-
# Whether to enable A/B testing for this search.
|
|
87
|
-
attr_accessor :enable_ab_test
|
|
88
|
-
|
|
89
84
|
# Search query.
|
|
90
85
|
attr_accessor :query
|
|
91
86
|
|
|
@@ -152,9 +147,6 @@ module Algolia
|
|
|
152
147
|
# Attributes to include in the API response To reduce the size of your response, you can retrieve only some of the attributes. Attribute names are case-sensitive - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included.
|
|
153
148
|
attr_accessor :attributes_to_retrieve
|
|
154
149
|
|
|
155
|
-
# Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute), you put the sorting attribute at the top of the list. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. Before you modify the default setting, test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing).
|
|
156
|
-
attr_accessor :ranking
|
|
157
|
-
|
|
158
150
|
# Relevancy threshold below which less relevant results aren't included in the results You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results.
|
|
159
151
|
attr_accessor :relevancy_strictness
|
|
160
152
|
|
|
@@ -200,9 +192,6 @@ module Algolia
|
|
|
200
192
|
# Whether to split compound words in the query into their building blocks For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. Decompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).
|
|
201
193
|
attr_accessor :decompound_query
|
|
202
194
|
|
|
203
|
-
# Whether to enable rules.
|
|
204
|
-
attr_accessor :enable_rules
|
|
205
|
-
|
|
206
195
|
# Whether to enable Personalization.
|
|
207
196
|
attr_accessor :enable_personalization
|
|
208
197
|
|
|
@@ -253,12 +242,14 @@ module Algolia
|
|
|
253
242
|
|
|
254
243
|
attr_accessor :re_ranking_apply_filter
|
|
255
244
|
|
|
245
|
+
# Whether to enable rules.
|
|
246
|
+
attr_accessor :enable_rules
|
|
247
|
+
|
|
256
248
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
257
249
|
def self.attribute_map
|
|
258
250
|
{
|
|
259
251
|
:similar_query => :similarQuery,
|
|
260
252
|
:filters => :filters,
|
|
261
|
-
:facet_filters => :facetFilters,
|
|
262
253
|
:optional_filters => :optionalFilters,
|
|
263
254
|
:numeric_filters => :numericFilters,
|
|
264
255
|
:tag_filters => :tagFilters,
|
|
@@ -283,7 +274,6 @@ module Algolia
|
|
|
283
274
|
:analytics => :analytics,
|
|
284
275
|
:analytics_tags => :analyticsTags,
|
|
285
276
|
:percentile_computation => :percentileComputation,
|
|
286
|
-
:enable_ab_test => :enableABTest,
|
|
287
277
|
:query => :query,
|
|
288
278
|
:attributes_for_faceting => :attributesForFaceting,
|
|
289
279
|
:replicas => :replicas,
|
|
@@ -306,7 +296,6 @@ module Algolia
|
|
|
306
296
|
:keep_diacritics_on_characters => :keepDiacriticsOnCharacters,
|
|
307
297
|
:custom_ranking => :customRanking,
|
|
308
298
|
:attributes_to_retrieve => :attributesToRetrieve,
|
|
309
|
-
:ranking => :ranking,
|
|
310
299
|
:relevancy_strictness => :relevancyStrictness,
|
|
311
300
|
:attributes_to_highlight => :attributesToHighlight,
|
|
312
301
|
:attributes_to_snippet => :attributesToSnippet,
|
|
@@ -323,7 +312,6 @@ module Algolia
|
|
|
323
312
|
:remove_stop_words => :removeStopWords,
|
|
324
313
|
:query_languages => :queryLanguages,
|
|
325
314
|
:decompound_query => :decompoundQuery,
|
|
326
|
-
:enable_rules => :enableRules,
|
|
327
315
|
:enable_personalization => :enablePersonalization,
|
|
328
316
|
:query_type => :queryType,
|
|
329
317
|
:remove_words_if_no_results => :removeWordsIfNoResults,
|
|
@@ -342,7 +330,8 @@ module Algolia
|
|
|
342
330
|
:attribute_criteria_computed_by_min_proximity => :attributeCriteriaComputedByMinProximity,
|
|
343
331
|
:rendering_content => :renderingContent,
|
|
344
332
|
:enable_re_ranking => :enableReRanking,
|
|
345
|
-
:re_ranking_apply_filter => :reRankingApplyFilter
|
|
333
|
+
:re_ranking_apply_filter => :reRankingApplyFilter,
|
|
334
|
+
:enable_rules => :enableRules
|
|
346
335
|
}
|
|
347
336
|
end
|
|
348
337
|
|
|
@@ -351,7 +340,6 @@ module Algolia
|
|
|
351
340
|
{
|
|
352
341
|
:similar_query => :"String",
|
|
353
342
|
:filters => :"String",
|
|
354
|
-
:facet_filters => :"FacetFilters",
|
|
355
343
|
:optional_filters => :"OptionalFilters",
|
|
356
344
|
:numeric_filters => :"NumericFilters",
|
|
357
345
|
:tag_filters => :"TagFilters",
|
|
@@ -376,7 +364,6 @@ module Algolia
|
|
|
376
364
|
:analytics => :"Boolean",
|
|
377
365
|
:analytics_tags => :"Array<String>",
|
|
378
366
|
:percentile_computation => :"Boolean",
|
|
379
|
-
:enable_ab_test => :"Boolean",
|
|
380
367
|
:query => :"String",
|
|
381
368
|
:attributes_for_faceting => :"Array<String>",
|
|
382
369
|
:replicas => :"Array<String>",
|
|
@@ -399,7 +386,6 @@ module Algolia
|
|
|
399
386
|
:keep_diacritics_on_characters => :"String",
|
|
400
387
|
:custom_ranking => :"Array<String>",
|
|
401
388
|
:attributes_to_retrieve => :"Array<String>",
|
|
402
|
-
:ranking => :"Array<String>",
|
|
403
389
|
:relevancy_strictness => :"Integer",
|
|
404
390
|
:attributes_to_highlight => :"Array<String>",
|
|
405
391
|
:attributes_to_snippet => :"Array<String>",
|
|
@@ -416,7 +402,6 @@ module Algolia
|
|
|
416
402
|
:remove_stop_words => :"RemoveStopWords",
|
|
417
403
|
:query_languages => :"Array<SupportedLanguage>",
|
|
418
404
|
:decompound_query => :"Boolean",
|
|
419
|
-
:enable_rules => :"Boolean",
|
|
420
405
|
:enable_personalization => :"Boolean",
|
|
421
406
|
:query_type => :"QueryType",
|
|
422
407
|
:remove_words_if_no_results => :"RemoveWordsIfNoResults",
|
|
@@ -435,7 +420,8 @@ module Algolia
|
|
|
435
420
|
:attribute_criteria_computed_by_min_proximity => :"Boolean",
|
|
436
421
|
:rendering_content => :"RenderingContent",
|
|
437
422
|
:enable_re_ranking => :"Boolean",
|
|
438
|
-
:re_ranking_apply_filter => :"ReRankingApplyFilter"
|
|
423
|
+
:re_ranking_apply_filter => :"ReRankingApplyFilter",
|
|
424
|
+
:enable_rules => :"Boolean"
|
|
439
425
|
}
|
|
440
426
|
end
|
|
441
427
|
|
|
@@ -491,10 +477,6 @@ module Algolia
|
|
|
491
477
|
self.filters = attributes[:filters]
|
|
492
478
|
end
|
|
493
479
|
|
|
494
|
-
if attributes.key?(:facet_filters)
|
|
495
|
-
self.facet_filters = attributes[:facet_filters]
|
|
496
|
-
end
|
|
497
|
-
|
|
498
480
|
if attributes.key?(:optional_filters)
|
|
499
481
|
self.optional_filters = attributes[:optional_filters]
|
|
500
482
|
end
|
|
@@ -603,10 +585,6 @@ module Algolia
|
|
|
603
585
|
self.percentile_computation = attributes[:percentile_computation]
|
|
604
586
|
end
|
|
605
587
|
|
|
606
|
-
if attributes.key?(:enable_ab_test)
|
|
607
|
-
self.enable_ab_test = attributes[:enable_ab_test]
|
|
608
|
-
end
|
|
609
|
-
|
|
610
588
|
if attributes.key?(:query)
|
|
611
589
|
self.query = attributes[:query]
|
|
612
590
|
end
|
|
@@ -721,12 +699,6 @@ module Algolia
|
|
|
721
699
|
end
|
|
722
700
|
end
|
|
723
701
|
|
|
724
|
-
if attributes.key?(:ranking)
|
|
725
|
-
if (value = attributes[:ranking]).is_a?(Array)
|
|
726
|
-
self.ranking = value
|
|
727
|
-
end
|
|
728
|
-
end
|
|
729
|
-
|
|
730
702
|
if attributes.key?(:relevancy_strictness)
|
|
731
703
|
self.relevancy_strictness = attributes[:relevancy_strictness]
|
|
732
704
|
end
|
|
@@ -799,10 +771,6 @@ module Algolia
|
|
|
799
771
|
self.decompound_query = attributes[:decompound_query]
|
|
800
772
|
end
|
|
801
773
|
|
|
802
|
-
if attributes.key?(:enable_rules)
|
|
803
|
-
self.enable_rules = attributes[:enable_rules]
|
|
804
|
-
end
|
|
805
|
-
|
|
806
774
|
if attributes.key?(:enable_personalization)
|
|
807
775
|
self.enable_personalization = attributes[:enable_personalization]
|
|
808
776
|
end
|
|
@@ -886,6 +854,10 @@ module Algolia
|
|
|
886
854
|
if attributes.key?(:re_ranking_apply_filter)
|
|
887
855
|
self.re_ranking_apply_filter = attributes[:re_ranking_apply_filter]
|
|
888
856
|
end
|
|
857
|
+
|
|
858
|
+
if attributes.key?(:enable_rules)
|
|
859
|
+
self.enable_rules = attributes[:enable_rules]
|
|
860
|
+
end
|
|
889
861
|
end
|
|
890
862
|
|
|
891
863
|
# Checks equality by comparing each attribute.
|
|
@@ -895,7 +867,6 @@ module Algolia
|
|
|
895
867
|
self.class == other.class &&
|
|
896
868
|
similar_query == other.similar_query &&
|
|
897
869
|
filters == other.filters &&
|
|
898
|
-
facet_filters == other.facet_filters &&
|
|
899
870
|
optional_filters == other.optional_filters &&
|
|
900
871
|
numeric_filters == other.numeric_filters &&
|
|
901
872
|
tag_filters == other.tag_filters &&
|
|
@@ -920,7 +891,6 @@ module Algolia
|
|
|
920
891
|
analytics == other.analytics &&
|
|
921
892
|
analytics_tags == other.analytics_tags &&
|
|
922
893
|
percentile_computation == other.percentile_computation &&
|
|
923
|
-
enable_ab_test == other.enable_ab_test &&
|
|
924
894
|
query == other.query &&
|
|
925
895
|
attributes_for_faceting == other.attributes_for_faceting &&
|
|
926
896
|
replicas == other.replicas &&
|
|
@@ -943,7 +913,6 @@ module Algolia
|
|
|
943
913
|
keep_diacritics_on_characters == other.keep_diacritics_on_characters &&
|
|
944
914
|
custom_ranking == other.custom_ranking &&
|
|
945
915
|
attributes_to_retrieve == other.attributes_to_retrieve &&
|
|
946
|
-
ranking == other.ranking &&
|
|
947
916
|
relevancy_strictness == other.relevancy_strictness &&
|
|
948
917
|
attributes_to_highlight == other.attributes_to_highlight &&
|
|
949
918
|
attributes_to_snippet == other.attributes_to_snippet &&
|
|
@@ -960,7 +929,6 @@ module Algolia
|
|
|
960
929
|
remove_stop_words == other.remove_stop_words &&
|
|
961
930
|
query_languages == other.query_languages &&
|
|
962
931
|
decompound_query == other.decompound_query &&
|
|
963
|
-
enable_rules == other.enable_rules &&
|
|
964
932
|
enable_personalization == other.enable_personalization &&
|
|
965
933
|
query_type == other.query_type &&
|
|
966
934
|
remove_words_if_no_results == other.remove_words_if_no_results &&
|
|
@@ -979,7 +947,8 @@ module Algolia
|
|
|
979
947
|
attribute_criteria_computed_by_min_proximity == other.attribute_criteria_computed_by_min_proximity &&
|
|
980
948
|
rendering_content == other.rendering_content &&
|
|
981
949
|
enable_re_ranking == other.enable_re_ranking &&
|
|
982
|
-
re_ranking_apply_filter == other.re_ranking_apply_filter
|
|
950
|
+
re_ranking_apply_filter == other.re_ranking_apply_filter &&
|
|
951
|
+
enable_rules == other.enable_rules
|
|
983
952
|
end
|
|
984
953
|
|
|
985
954
|
# @see the `==` method
|
|
@@ -994,7 +963,6 @@ module Algolia
|
|
|
994
963
|
[
|
|
995
964
|
similar_query,
|
|
996
965
|
filters,
|
|
997
|
-
facet_filters,
|
|
998
966
|
optional_filters,
|
|
999
967
|
numeric_filters,
|
|
1000
968
|
tag_filters,
|
|
@@ -1019,7 +987,6 @@ module Algolia
|
|
|
1019
987
|
analytics,
|
|
1020
988
|
analytics_tags,
|
|
1021
989
|
percentile_computation,
|
|
1022
|
-
enable_ab_test,
|
|
1023
990
|
query,
|
|
1024
991
|
attributes_for_faceting,
|
|
1025
992
|
replicas,
|
|
@@ -1042,7 +1009,6 @@ module Algolia
|
|
|
1042
1009
|
keep_diacritics_on_characters,
|
|
1043
1010
|
custom_ranking,
|
|
1044
1011
|
attributes_to_retrieve,
|
|
1045
|
-
ranking,
|
|
1046
1012
|
relevancy_strictness,
|
|
1047
1013
|
attributes_to_highlight,
|
|
1048
1014
|
attributes_to_snippet,
|
|
@@ -1059,7 +1025,6 @@ module Algolia
|
|
|
1059
1025
|
remove_stop_words,
|
|
1060
1026
|
query_languages,
|
|
1061
1027
|
decompound_query,
|
|
1062
|
-
enable_rules,
|
|
1063
1028
|
enable_personalization,
|
|
1064
1029
|
query_type,
|
|
1065
1030
|
remove_words_if_no_results,
|
|
@@ -1078,7 +1043,8 @@ module Algolia
|
|
|
1078
1043
|
attribute_criteria_computed_by_min_proximity,
|
|
1079
1044
|
rendering_content,
|
|
1080
1045
|
enable_re_ranking,
|
|
1081
|
-
re_ranking_apply_filter
|
|
1046
|
+
re_ranking_apply_filter,
|
|
1047
|
+
enable_rules
|
|
1082
1048
|
].hash
|
|
1083
1049
|
end
|
|
1084
1050
|
|
data/lib/algolia/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: algolia
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.42.
|
|
4
|
+
version: 3.42.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- https://alg.li/support
|
|
@@ -734,7 +734,6 @@ files:
|
|
|
734
734
|
- lib/algolia/models/recommend/error_base.rb
|
|
735
735
|
- lib/algolia/models/recommend/exact_on_single_word_query.rb
|
|
736
736
|
- lib/algolia/models/recommend/exhaustive.rb
|
|
737
|
-
- lib/algolia/models/recommend/facet_filters.rb
|
|
738
737
|
- lib/algolia/models/recommend/facet_ordering.rb
|
|
739
738
|
- lib/algolia/models/recommend/facet_stats.rb
|
|
740
739
|
- lib/algolia/models/recommend/fallback_params.rb
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
# Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
4
|
-
|
|
5
|
-
require "date"
|
|
6
|
-
require "time"
|
|
7
|
-
|
|
8
|
-
module Algolia
|
|
9
|
-
module Recommend
|
|
10
|
-
# Filter the search by facet values, so that only records with the same facet values are retrieved. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** - `[filter1, filter2]` is interpreted as `filter1 AND filter2`. - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`. - `facet:-value` is interpreted as `NOT facet:value`. While it's best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash: `facet:\\-value`.
|
|
11
|
-
module FacetFilters
|
|
12
|
-
class << self
|
|
13
|
-
# List of class defined in oneOf (OpenAPI v3)
|
|
14
|
-
def openapi_one_of
|
|
15
|
-
[
|
|
16
|
-
:"Array<FacetFilters>",
|
|
17
|
-
:"String"
|
|
18
|
-
]
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
# Builds the object
|
|
22
|
-
# @param [Mixed] Data to be matched against the list of oneOf items
|
|
23
|
-
# @return [Object] Returns the model or the data itself
|
|
24
|
-
def build(data)
|
|
25
|
-
# Go through the list of oneOf items and attempt to identify the appropriate one.
|
|
26
|
-
# Note:
|
|
27
|
-
# - We do not attempt to check whether exactly one item matches.
|
|
28
|
-
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
|
|
29
|
-
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
|
|
30
|
-
# - TODO: scalar values are de facto behaving as if they were nullable.
|
|
31
|
-
# - TODO: logging when debugging is set.
|
|
32
|
-
openapi_one_of.each do |klass|
|
|
33
|
-
begin
|
|
34
|
-
# "nullable: true"
|
|
35
|
-
next if klass == :AnyType
|
|
36
|
-
typed_data = find_and_cast_into_type(klass, data)
|
|
37
|
-
return typed_data if typed_data
|
|
38
|
-
# rescue all errors so we keep iterating even if the current item lookup raises
|
|
39
|
-
rescue
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
openapi_one_of.include?(:AnyType) ? data : nil
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
private
|
|
47
|
-
|
|
48
|
-
SchemaMismatchError = Class.new(StandardError)
|
|
49
|
-
|
|
50
|
-
def find_and_cast_into_type(klass, data)
|
|
51
|
-
return if data.nil?
|
|
52
|
-
|
|
53
|
-
case klass.to_s
|
|
54
|
-
when "Boolean"
|
|
55
|
-
return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
|
|
56
|
-
when "Float"
|
|
57
|
-
return data if data.instance_of?(Float)
|
|
58
|
-
when "Integer"
|
|
59
|
-
return data if data.instance_of?(Integer)
|
|
60
|
-
when "Time"
|
|
61
|
-
return Time.parse(data)
|
|
62
|
-
when "Date"
|
|
63
|
-
return Date.parse(data)
|
|
64
|
-
when "String"
|
|
65
|
-
return data if data.instance_of?(String)
|
|
66
|
-
# "type: object"
|
|
67
|
-
when "Object"
|
|
68
|
-
return data if data.instance_of?(Hash)
|
|
69
|
-
# "type: array"
|
|
70
|
-
when /\AArray<(?<sub_type>.+)>\z/
|
|
71
|
-
if data.instance_of?(Array)
|
|
72
|
-
sub_type = Regexp.last_match[:sub_type]
|
|
73
|
-
return data.map { |item| find_and_cast_into_type(sub_type, item) }
|
|
74
|
-
end
|
|
75
|
-
# "type: object" with "additionalProperties: { ... }"
|
|
76
|
-
when /\AHash<String, (?<sub_type>.+)>\z/
|
|
77
|
-
if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
|
|
78
|
-
sub_type = Regexp.last_match[:sub_type]
|
|
79
|
-
return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
|
|
80
|
-
end
|
|
81
|
-
# model
|
|
82
|
-
else
|
|
83
|
-
const = Algolia::Recommend.const_get(klass)
|
|
84
|
-
if const
|
|
85
|
-
if const.respond_to?(:openapi_one_of)
|
|
86
|
-
# nested oneOf model
|
|
87
|
-
model = const.build(data)
|
|
88
|
-
elsif const.respond_to?(:discriminator_attributes)
|
|
89
|
-
if const.discriminator_attributes.all? { |attr| data.key?(attr) }
|
|
90
|
-
model = const.build_from_hash(data)
|
|
91
|
-
end
|
|
92
|
-
else
|
|
93
|
-
# maybe it's an enum, or doens't have discriminators
|
|
94
|
-
model = const.build_from_hash(data)
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
return model if model
|
|
98
|
-
end
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
# if no match by now, raise
|
|
102
|
-
raise
|
|
103
|
-
rescue
|
|
104
|
-
raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
|
|
105
|
-
end
|
|
106
|
-
end
|
|
107
|
-
end
|
|
108
|
-
end
|
|
109
|
-
end
|