algolia 3.5.1 → 3.5.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.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/Gemfile.lock +1 -1
  4. data/lib/algolia/api/abtesting_client.rb +17 -9
  5. data/lib/algolia/api/analytics_client.rb +173 -165
  6. data/lib/algolia/api/ingestion_client.rb +38 -30
  7. data/lib/algolia/api/insights_client.rb +18 -10
  8. data/lib/algolia/api/monitoring_client.rb +22 -14
  9. data/lib/algolia/api/personalization_client.rb +16 -8
  10. data/lib/algolia/api/query_suggestions_client.rb +17 -9
  11. data/lib/algolia/api/recommend_client.rb +17 -9
  12. data/lib/algolia/api/search_client.rb +60 -52
  13. data/lib/algolia/configuration.rb +16 -1
  14. data/lib/algolia/models/abtesting/ab_test_configuration.rb +0 -2
  15. data/lib/algolia/models/abtesting/variant.rb +0 -2
  16. data/lib/algolia/models/ingestion/event.rb +1 -11
  17. data/lib/algolia/models/recommend/fallback_params.rb +3 -3
  18. data/lib/algolia/models/recommend/recommend_hit.rb +0 -2
  19. data/lib/algolia/models/recommend/recommend_search_params.rb +3 -3
  20. data/lib/algolia/models/recommend/recommendations_results.rb +13 -0
  21. data/lib/algolia/models/recommend/search_recommend_rules_params.rb +2 -2
  22. data/lib/algolia/models/recommend/trending_facet_hit.rb +0 -2
  23. data/lib/algolia/models/search/browse_params_object.rb +1 -1
  24. data/lib/algolia/models/search/browse_response.rb +13 -0
  25. data/lib/algolia/models/search/consequence_params.rb +1 -1
  26. data/lib/algolia/models/search/get_api_key_response.rb +2 -0
  27. data/lib/algolia/models/search/get_objects_response.rb +0 -2
  28. data/lib/algolia/models/search/index_settings.rb +3 -3
  29. data/lib/algolia/models/search/search_dictionary_entries_response.rb +1 -1
  30. data/lib/algolia/models/search/search_for_facets.rb +1 -1
  31. data/lib/algolia/models/search/search_for_hits.rb +1 -1
  32. data/lib/algolia/models/search/search_params_object.rb +1 -1
  33. data/lib/algolia/models/search/search_response.rb +13 -0
  34. data/lib/algolia/models/search/search_rules_params.rb +2 -2
  35. data/lib/algolia/models/search/search_user_ids_response.rb +1 -1
  36. data/lib/algolia/models/search/settings_response.rb +3 -3
  37. data/lib/algolia/user_agent.rb +8 -2
  38. data/lib/algolia/version.rb +1 -1
  39. metadata +2 -2
@@ -99,7 +99,7 @@ module Algolia
99
99
  # Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results. Attribute names are case-sensitive.
100
100
  attr_accessor :unretrievable_attributes
101
101
 
102
- # Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words.
102
+ # Creates a list of [words which require exact matches](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#turn-off-typo-tolerance-for-certain-words). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words.
103
103
  attr_accessor :disable_typo_tolerance_on_words
104
104
 
105
105
  # Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. Attribute names are case-sensitive.
@@ -123,7 +123,7 @@ module Algolia
123
123
  # Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). Attribute names are case-sensitive. By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. To turn off filtering for all numeric attributes, specify an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier** - `equalOnly(\"ATTRIBUTE\")`. Support only filtering based on equality comparisons `=` and `!=`.
124
124
  attr_accessor :numeric_attributes_for_filtering
125
125
 
126
- # Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches.
126
+ # Control which non-alphanumeric characters are indexed. By default, Algolia ignores [non-alphanumeric characters](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/#handling-non-alphanumeric-characters) like hyphen (`-`), plus (`+`), and parentheses (`(`,`)`). To include such characters, define them with `separatorsToIndex`. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, in a search for \"Disney+\", Algolia considers \"Disney\" and \"+\" as two separate words.
127
127
  attr_accessor :separators_to_index
128
128
 
129
129
  # Attributes used for searching. Attribute names are case-sensitive. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier** - `unordered(\"ATTRIBUTE\")`. Ignore the position of a match within the attribute. Without a modifier, matches at the beginning of an attribute rank higher than matches at the end.
@@ -210,7 +210,7 @@ module Algolia
210
210
 
211
211
  attr_accessor :exact_on_single_word_query
212
212
 
213
- # Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY/NYC\" are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
213
+ # Determine which plurals and synonyms should be considered an exact matches. By default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching. For example: - \"swimsuit\" and \"swimsuits\" are treated the same - \"swimsuit\" and \"swimwear\" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms)). - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches.
214
214
  attr_accessor :alternatives_as_exact
215
215
 
216
216
  # Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` is true.
@@ -99,8 +99,6 @@ module Algolia
99
99
 
100
100
  if attributes.key?(:_score)
101
101
  self._score = attributes[:_score]
102
- else
103
- self._score = nil
104
102
  end
105
103
 
106
104
  # add extra attribute to additional_properties
@@ -100,7 +100,7 @@ module Algolia
100
100
  # Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results. Attribute names are case-sensitive.
101
101
  attr_accessor :unretrievable_attributes
102
102
 
103
- # Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words.
103
+ # Creates a list of [words which require exact matches](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#turn-off-typo-tolerance-for-certain-words). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words.
104
104
  attr_accessor :disable_typo_tolerance_on_words
105
105
 
106
106
  # Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. Attribute names are case-sensitive.
@@ -124,7 +124,7 @@ module Algolia
124
124
  # Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). Attribute names are case-sensitive. By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. To turn off filtering for all numeric attributes, specify an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier** - `equalOnly(\"ATTRIBUTE\")`. Support only filtering based on equality comparisons `=` and `!=`.
125
125
  attr_accessor :numeric_attributes_for_filtering
126
126
 
127
- # Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches.
127
+ # Control which non-alphanumeric characters are indexed. By default, Algolia ignores [non-alphanumeric characters](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/#handling-non-alphanumeric-characters) like hyphen (`-`), plus (`+`), and parentheses (`(`,`)`). To include such characters, define them with `separatorsToIndex`. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, in a search for \"Disney+\", Algolia considers \"Disney\" and \"+\" as two separate words.
128
128
  attr_accessor :separators_to_index
129
129
 
130
130
  # Attributes used for searching. Attribute names are case-sensitive. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier** - `unordered(\"ATTRIBUTE\")`. Ignore the position of a match within the attribute. Without a modifier, matches at the beginning of an attribute rank higher than matches at the end.
@@ -211,7 +211,7 @@ module Algolia
211
211
 
212
212
  attr_accessor :exact_on_single_word_query
213
213
 
214
- # Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY/NYC\" are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
214
+ # Determine which plurals and synonyms should be considered an exact matches. By default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching. For example: - \"swimsuit\" and \"swimsuits\" are treated the same - \"swimsuit\" and \"swimwear\" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms)). - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches.
215
215
  attr_accessor :alternatives_as_exact
216
216
 
217
217
  # Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` is true.
@@ -20,6 +20,9 @@ module Algolia
20
20
 
21
21
  attr_accessor :exhaustive
22
22
 
23
+ # Rules applied to the query.
24
+ attr_accessor :applied_rules
25
+
23
26
  # See the `facetsCount` field of the `exhaustive` object in the response.
24
27
  attr_accessor :exhaustive_facets_count
25
28
 
@@ -100,6 +103,7 @@ module Algolia
100
103
  :around_lat_lng => :aroundLatLng,
101
104
  :automatic_radius => :automaticRadius,
102
105
  :exhaustive => :exhaustive,
106
+ :applied_rules => :appliedRules,
103
107
  :exhaustive_facets_count => :exhaustiveFacetsCount,
104
108
  :exhaustive_nb_hits => :exhaustiveNbHits,
105
109
  :exhaustive_typo => :exhaustiveTypo,
@@ -141,6 +145,7 @@ module Algolia
141
145
  :around_lat_lng => :"String",
142
146
  :automatic_radius => :"String",
143
147
  :exhaustive => :"Exhaustive",
148
+ :applied_rules => :"Array<Object>",
144
149
  :exhaustive_facets_count => :"Boolean",
145
150
  :exhaustive_nb_hits => :"Boolean",
146
151
  :exhaustive_typo => :"Boolean",
@@ -228,6 +233,12 @@ module Algolia
228
233
  self.exhaustive = attributes[:exhaustive]
229
234
  end
230
235
 
236
+ if attributes.key?(:applied_rules)
237
+ if (value = attributes[:applied_rules]).is_a?(Array)
238
+ self.applied_rules = value
239
+ end
240
+ end
241
+
231
242
  if attributes.key?(:exhaustive_facets_count)
232
243
  self.exhaustive_facets_count = attributes[:exhaustive_facets_count]
233
244
  end
@@ -349,6 +360,7 @@ module Algolia
349
360
  around_lat_lng == other.around_lat_lng &&
350
361
  automatic_radius == other.automatic_radius &&
351
362
  exhaustive == other.exhaustive &&
363
+ applied_rules == other.applied_rules &&
352
364
  exhaustive_facets_count == other.exhaustive_facets_count &&
353
365
  exhaustive_nb_hits == other.exhaustive_nb_hits &&
354
366
  exhaustive_typo == other.exhaustive_typo &&
@@ -391,6 +403,7 @@ module Algolia
391
403
  around_lat_lng,
392
404
  automatic_radius,
393
405
  exhaustive,
406
+ applied_rules,
394
407
  exhaustive_facets_count,
395
408
  exhaustive_nb_hits,
396
409
  exhaustive_typo,
@@ -13,10 +13,10 @@ module Algolia
13
13
  # Only search for rules with matching context.
14
14
  attr_accessor :context
15
15
 
16
- # Requested page of the API response.
16
+ # Requested page of the API response. Algolia uses `page` and `hitsPerPage` to control how search results are displayed ([paginated](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/)). - `hitsPerPage`: sets the number of search results (_hits_) displayed per page. - `page`: specifies the page number of the search results you want to retrieve. Page numbering starts at 0, so the first page is `page=0`, the second is `page=1`, and so on. For example, to display 10 results per page starting from the third page, set `hitsPerPage` to 10 and `page` to 2.
17
17
  attr_accessor :page
18
18
 
19
- # Maximum number of hits per page.
19
+ # Maximum number of hits per page. Algolia uses `page` and `hitsPerPage` to control how search results are displayed ([paginated](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/)). - `hitsPerPage`: sets the number of search results (_hits_) displayed per page. - `page`: specifies the page number of the search results you want to retrieve. Page numbering starts at 0, so the first page is `page=0`, the second is `page=1`, and so on. For example, to display 10 results per page starting from the third page, set `hitsPerPage` to 10 and `page` to 2.
20
20
  attr_accessor :hits_per_page
21
21
 
22
22
  # Whether to only show rules where the value of their `enabled` property matches this parameter. If absent, show all rules, regardless of their `enabled` property.
@@ -71,8 +71,6 @@ module Algolia
71
71
 
72
72
  if attributes.key?(:_score)
73
73
  self._score = attributes[:_score]
74
- else
75
- self._score = nil
76
74
  end
77
75
 
78
76
  if attributes.key?(:facet_name)
@@ -181,7 +181,7 @@ module Algolia
181
181
 
182
182
  attr_accessor :exact_on_single_word_query
183
183
 
184
- # Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY/NYC\" are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
184
+ # Determine which plurals and synonyms should be considered an exact matches. By default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching. For example: - \"swimsuit\" and \"swimsuits\" are treated the same - \"swimsuit\" and \"swimwear\" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms)). - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches.
185
185
  attr_accessor :alternatives_as_exact
186
186
 
187
187
  # Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` is true.
@@ -20,6 +20,9 @@ module Algolia
20
20
 
21
21
  attr_accessor :exhaustive
22
22
 
23
+ # Rules applied to the query.
24
+ attr_accessor :applied_rules
25
+
23
26
  # See the `facetsCount` field of the `exhaustive` object in the response.
24
27
  attr_accessor :exhaustive_facets_count
25
28
 
@@ -110,6 +113,7 @@ module Algolia
110
113
  :around_lat_lng => :aroundLatLng,
111
114
  :automatic_radius => :automaticRadius,
112
115
  :exhaustive => :exhaustive,
116
+ :applied_rules => :appliedRules,
113
117
  :exhaustive_facets_count => :exhaustiveFacetsCount,
114
118
  :exhaustive_nb_hits => :exhaustiveNbHits,
115
119
  :exhaustive_typo => :exhaustiveTypo,
@@ -154,6 +158,7 @@ module Algolia
154
158
  :around_lat_lng => :"String",
155
159
  :automatic_radius => :"String",
156
160
  :exhaustive => :"Exhaustive",
161
+ :applied_rules => :"Array<Object>",
157
162
  :exhaustive_facets_count => :"Boolean",
158
163
  :exhaustive_nb_hits => :"Boolean",
159
164
  :exhaustive_typo => :"Boolean",
@@ -245,6 +250,12 @@ module Algolia
245
250
  self.exhaustive = attributes[:exhaustive]
246
251
  end
247
252
 
253
+ if attributes.key?(:applied_rules)
254
+ if (value = attributes[:applied_rules]).is_a?(Array)
255
+ self.applied_rules = value
256
+ end
257
+ end
258
+
248
259
  if attributes.key?(:exhaustive_facets_count)
249
260
  self.exhaustive_facets_count = attributes[:exhaustive_facets_count]
250
261
  end
@@ -382,6 +393,7 @@ module Algolia
382
393
  around_lat_lng == other.around_lat_lng &&
383
394
  automatic_radius == other.automatic_radius &&
384
395
  exhaustive == other.exhaustive &&
396
+ applied_rules == other.applied_rules &&
385
397
  exhaustive_facets_count == other.exhaustive_facets_count &&
386
398
  exhaustive_nb_hits == other.exhaustive_nb_hits &&
387
399
  exhaustive_typo == other.exhaustive_typo &&
@@ -427,6 +439,7 @@ module Algolia
427
439
  around_lat_lng,
428
440
  automatic_radius,
429
441
  exhaustive,
442
+ applied_rules,
430
443
  exhaustive_facets_count,
431
444
  exhaustive_nb_hits,
432
445
  exhaustive_typo,
@@ -178,7 +178,7 @@ module Algolia
178
178
 
179
179
  attr_accessor :exact_on_single_word_query
180
180
 
181
- # Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY/NYC\" are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
181
+ # Determine which plurals and synonyms should be considered an exact matches. By default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching. For example: - \"swimsuit\" and \"swimsuits\" are treated the same - \"swimsuit\" and \"swimwear\" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms)). - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches.
182
182
  attr_accessor :alternatives_as_exact
183
183
 
184
184
  # Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` is true.
@@ -113,6 +113,8 @@ module Algolia
113
113
 
114
114
  if attributes.key?(:value)
115
115
  self.value = attributes[:value]
116
+ else
117
+ self.value = nil
116
118
  end
117
119
 
118
120
  if attributes.key?(:created_at)
@@ -62,8 +62,6 @@ module Algolia
62
62
  if (value = attributes[:results]).is_a?(Array)
63
63
  self.results = value
64
64
  end
65
- else
66
- self.results = nil
67
65
  end
68
66
  end
69
67
 
@@ -19,7 +19,7 @@ module Algolia
19
19
  # Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results. Attribute names are case-sensitive.
20
20
  attr_accessor :unretrievable_attributes
21
21
 
22
- # Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words.
22
+ # Creates a list of [words which require exact matches](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#turn-off-typo-tolerance-for-certain-words). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words.
23
23
  attr_accessor :disable_typo_tolerance_on_words
24
24
 
25
25
  # Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. Attribute names are case-sensitive.
@@ -43,7 +43,7 @@ module Algolia
43
43
  # Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). Attribute names are case-sensitive. By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. To turn off filtering for all numeric attributes, specify an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier** - `equalOnly(\"ATTRIBUTE\")`. Support only filtering based on equality comparisons `=` and `!=`.
44
44
  attr_accessor :numeric_attributes_for_filtering
45
45
 
46
- # Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches.
46
+ # Control which non-alphanumeric characters are indexed. By default, Algolia ignores [non-alphanumeric characters](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/#handling-non-alphanumeric-characters) like hyphen (`-`), plus (`+`), and parentheses (`(`,`)`). To include such characters, define them with `separatorsToIndex`. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, in a search for \"Disney+\", Algolia considers \"Disney\" and \"+\" as two separate words.
47
47
  attr_accessor :separators_to_index
48
48
 
49
49
  # Attributes used for searching. Attribute names are case-sensitive. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier** - `unordered(\"ATTRIBUTE\")`. Ignore the position of a match within the attribute. Without a modifier, matches at the beginning of an attribute rank higher than matches at the end.
@@ -143,7 +143,7 @@ module Algolia
143
143
 
144
144
  attr_accessor :exact_on_single_word_query
145
145
 
146
- # Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY/NYC\" are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
146
+ # Determine which plurals and synonyms should be considered an exact matches. By default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching. For example: - \"swimsuit\" and \"swimsuits\" are treated the same - \"swimsuit\" and \"swimwear\" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms)). - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches.
147
147
  attr_accessor :alternatives_as_exact
148
148
 
149
149
  # Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` is true.
@@ -9,7 +9,7 @@ module Algolia
9
9
  # Dictionary entries matching the search criteria.
10
10
  attr_accessor :hits
11
11
 
12
- # Requested page of the API response.
12
+ # Requested page of the API response. Algolia uses `page` and `hitsPerPage` to control how search results are displayed ([paginated](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/)). - `hitsPerPage`: sets the number of search results (_hits_) displayed per page. - `page`: specifies the page number of the search results you want to retrieve. Page numbering starts at 0, so the first page is `page=0`, the second is `page=1`, and so on. For example, to display 10 results per page starting from the third page, set `hitsPerPage` to 10 and `page` to 2.
13
13
  attr_accessor :page
14
14
 
15
15
  # Number of results (hits).
@@ -184,7 +184,7 @@ module Algolia
184
184
 
185
185
  attr_accessor :exact_on_single_word_query
186
186
 
187
- # Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY/NYC\" are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
187
+ # Determine which plurals and synonyms should be considered an exact matches. By default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching. For example: - \"swimsuit\" and \"swimsuits\" are treated the same - \"swimsuit\" and \"swimwear\" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms)). - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches.
188
188
  attr_accessor :alternatives_as_exact
189
189
 
190
190
  # Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` is true.
@@ -184,7 +184,7 @@ module Algolia
184
184
 
185
185
  attr_accessor :exact_on_single_word_query
186
186
 
187
- # Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY/NYC\" are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
187
+ # Determine which plurals and synonyms should be considered an exact matches. By default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching. For example: - \"swimsuit\" and \"swimsuits\" are treated the same - \"swimsuit\" and \"swimwear\" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms)). - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches.
188
188
  attr_accessor :alternatives_as_exact
189
189
 
190
190
  # Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` is true.
@@ -182,7 +182,7 @@ module Algolia
182
182
 
183
183
  attr_accessor :exact_on_single_word_query
184
184
 
185
- # Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY/NYC\" are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
185
+ # Determine which plurals and synonyms should be considered an exact matches. By default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching. For example: - \"swimsuit\" and \"swimsuits\" are treated the same - \"swimsuit\" and \"swimwear\" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms)). - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches.
186
186
  attr_accessor :alternatives_as_exact
187
187
 
188
188
  # Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` is true.
@@ -20,6 +20,9 @@ module Algolia
20
20
 
21
21
  attr_accessor :exhaustive
22
22
 
23
+ # Rules applied to the query.
24
+ attr_accessor :applied_rules
25
+
23
26
  # See the `facetsCount` field of the `exhaustive` object in the response.
24
27
  attr_accessor :exhaustive_facets_count
25
28
 
@@ -109,6 +112,7 @@ module Algolia
109
112
  :around_lat_lng => :aroundLatLng,
110
113
  :automatic_radius => :automaticRadius,
111
114
  :exhaustive => :exhaustive,
115
+ :applied_rules => :appliedRules,
112
116
  :exhaustive_facets_count => :exhaustiveFacetsCount,
113
117
  :exhaustive_nb_hits => :exhaustiveNbHits,
114
118
  :exhaustive_typo => :exhaustiveTypo,
@@ -152,6 +156,7 @@ module Algolia
152
156
  :around_lat_lng => :"String",
153
157
  :automatic_radius => :"String",
154
158
  :exhaustive => :"Exhaustive",
159
+ :applied_rules => :"Array<Object>",
155
160
  :exhaustive_facets_count => :"Boolean",
156
161
  :exhaustive_nb_hits => :"Boolean",
157
162
  :exhaustive_typo => :"Boolean",
@@ -228,6 +233,12 @@ module Algolia
228
233
  self.exhaustive = attributes[:exhaustive]
229
234
  end
230
235
 
236
+ if attributes.key?(:applied_rules)
237
+ if (value = attributes[:applied_rules]).is_a?(Array)
238
+ self.applied_rules = value
239
+ end
240
+ end
241
+
231
242
  if attributes.key?(:exhaustive_facets_count)
232
243
  self.exhaustive_facets_count = attributes[:exhaustive_facets_count]
233
244
  end
@@ -365,6 +376,7 @@ module Algolia
365
376
  around_lat_lng == other.around_lat_lng &&
366
377
  automatic_radius == other.automatic_radius &&
367
378
  exhaustive == other.exhaustive &&
379
+ applied_rules == other.applied_rules &&
368
380
  exhaustive_facets_count == other.exhaustive_facets_count &&
369
381
  exhaustive_nb_hits == other.exhaustive_nb_hits &&
370
382
  exhaustive_typo == other.exhaustive_typo &&
@@ -409,6 +421,7 @@ module Algolia
409
421
  around_lat_lng,
410
422
  automatic_radius,
411
423
  exhaustive,
424
+ applied_rules,
412
425
  exhaustive_facets_count,
413
426
  exhaustive_nb_hits,
414
427
  exhaustive_typo,
@@ -15,10 +15,10 @@ module Algolia
15
15
  # Only return rules that match the context (exact match).
16
16
  attr_accessor :context
17
17
 
18
- # Requested page of the API response.
18
+ # Requested page of the API response. Algolia uses `page` and `hitsPerPage` to control how search results are displayed ([paginated](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/)). - `hitsPerPage`: sets the number of search results (_hits_) displayed per page. - `page`: specifies the page number of the search results you want to retrieve. Page numbering starts at 0, so the first page is `page=0`, the second is `page=1`, and so on. For example, to display 10 results per page starting from the third page, set `hitsPerPage` to 10 and `page` to 2.
19
19
  attr_accessor :page
20
20
 
21
- # Maximum number of hits per page.
21
+ # Maximum number of hits per page. Algolia uses `page` and `hitsPerPage` to control how search results are displayed ([paginated](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/)). - `hitsPerPage`: sets the number of search results (_hits_) displayed per page. - `page`: specifies the page number of the search results you want to retrieve. Page numbering starts at 0, so the first page is `page=0`, the second is `page=1`, and so on. For example, to display 10 results per page starting from the third page, set `hitsPerPage` to 10 and `page` to 2.
22
22
  attr_accessor :hits_per_page
23
23
 
24
24
  # If `true`, return only enabled rules. If `false`, return only inactive rules. By default, _all_ rules are returned.
@@ -16,7 +16,7 @@ module Algolia
16
16
  # Page of search results to retrieve.
17
17
  attr_accessor :page
18
18
 
19
- # Maximum number of hits per page.
19
+ # Maximum number of hits per page. Algolia uses `page` and `hitsPerPage` to control how search results are displayed ([paginated](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/)). - `hitsPerPage`: sets the number of search results (_hits_) displayed per page. - `page`: specifies the page number of the search results you want to retrieve. Page numbering starts at 0, so the first page is `page=0`, the second is `page=1`, and so on. For example, to display 10 results per page starting from the third page, set `hitsPerPage` to 10 and `page` to 2.
20
20
  attr_accessor :hits_per_page
21
21
 
22
22
  # Date and time when the object was updated, in RFC 3339 format.
@@ -18,7 +18,7 @@ module Algolia
18
18
  # Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results. Attribute names are case-sensitive.
19
19
  attr_accessor :unretrievable_attributes
20
20
 
21
- # Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words.
21
+ # Creates a list of [words which require exact matches](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#turn-off-typo-tolerance-for-certain-words). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words.
22
22
  attr_accessor :disable_typo_tolerance_on_words
23
23
 
24
24
  # Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. Attribute names are case-sensitive.
@@ -42,7 +42,7 @@ module Algolia
42
42
  # Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). Attribute names are case-sensitive. By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. To turn off filtering for all numeric attributes, specify an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier** - `equalOnly(\"ATTRIBUTE\")`. Support only filtering based on equality comparisons `=` and `!=`.
43
43
  attr_accessor :numeric_attributes_for_filtering
44
44
 
45
- # Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches.
45
+ # Control which non-alphanumeric characters are indexed. By default, Algolia ignores [non-alphanumeric characters](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/#handling-non-alphanumeric-characters) like hyphen (`-`), plus (`+`), and parentheses (`(`,`)`). To include such characters, define them with `separatorsToIndex`. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, in a search for \"Disney+\", Algolia considers \"Disney\" and \"+\" as two separate words.
46
46
  attr_accessor :separators_to_index
47
47
 
48
48
  # Attributes used for searching. Attribute names are case-sensitive. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier** - `unordered(\"ATTRIBUTE\")`. Ignore the position of a match within the attribute. Without a modifier, matches at the beginning of an attribute rank higher than matches at the end.
@@ -142,7 +142,7 @@ module Algolia
142
142
 
143
143
  attr_accessor :exact_on_single_word_query
144
144
 
145
- # Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY/NYC\" are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
145
+ # Determine which plurals and synonyms should be considered an exact matches. By default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching. For example: - \"swimsuit\" and \"swimsuits\" are treated the same - \"swimsuit\" and \"swimwear\" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms)). - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches.
146
146
  attr_accessor :alternatives_as_exact
147
147
 
148
148
  # Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` is true.
@@ -8,8 +8,14 @@ module Algolia
8
8
 
9
9
  # Adds a segment to the UserAgent
10
10
  #
11
- def add(segment, version)
12
- @value += format("; %<segment>s (%<version>s)", segment: segment, version: version)
11
+ def add(segment, version = nil)
12
+ if version.nil?
13
+ @value += format("; %<segment>s", segment: segment)
14
+ else
15
+ @value += format("; %<segment>s (%<version>s)", segment: segment, version: version)
16
+ end
17
+
18
+ self
13
19
  end
14
20
  end
15
21
  end
@@ -1,5 +1,5 @@
1
1
  # 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.
2
2
 
3
3
  module Algolia
4
- VERSION = "3.5.1".freeze
4
+ VERSION = "3.5.2".freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: algolia
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.1
4
+ version: 3.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - https://alg.li/support
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-10 00:00:00.000000000 Z
11
+ date: 2024-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday