algolia 3.0.0.alpha.13 → 3.0.0.alpha.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e4fbe2b698812871b1a0c9034fedb008a19dbdcdcee407ace38ca09865fc6110
4
- data.tar.gz: aaee5dfa9f79c9ce0f5465e63c14a138d26d363607454d8e670c11ba7fa0969d
3
+ metadata.gz: e0e9421cce47768ebabacaad9971f24cbfd2717a6fa5e54aa18c142a70677483
4
+ data.tar.gz: d7897e3832f90b368e9c22826b053c9dbdf23c17283f040a6c69b871fe26de9d
5
5
  SHA512:
6
- metadata.gz: 58cd812c3b1aff54e37e2412d2000793f2f4bad85e84ff2b562ef4d8c718df1ef4b54431bf0b8d7144110c373a660d32e55003f1fb3246cd424f337d6bcdac21
7
- data.tar.gz: b7f427684dc9301d44626a3f948f9ed5163f840a86650e6d5d9d1a01e17dce2eae1bb04a901c8ab68082c75a4b5dcd47452db0a9db29f1a313818937e4f448f5
6
+ metadata.gz: 528208e232f76d833a3e2dc4d126e68898a03a2b98eb6f687d65d20853c99b18159b999c8fd1b987515649362312532d89162b974aed6151247c8a1d56056997
7
+ data.tar.gz: e6d5c1dda5c8d16c3b41c680322b14a5d421fe9dae395e9ec235ad96dd91c5923a1b37328e48acc5b8ddc51c0a3f2e64323554b84b22c84c5ffa9d5ebd42b081
@@ -149,6 +149,7 @@ lib/algolia/models/search/snippet_result_option.rb
149
149
  lib/algolia/models/search/sort_remaining_by.rb
150
150
  lib/algolia/models/search/source.rb
151
151
  lib/algolia/models/search/standard_entries.rb
152
+ lib/algolia/models/search/supported_language.rb
152
153
  lib/algolia/models/search/synonym_hit.rb
153
154
  lib/algolia/models/search/synonym_type.rb
154
155
  lib/algolia/models/search/tag_filters.rb
@@ -1 +1 @@
1
- 7.3.0
1
+ 7.4.0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [3.0.0.alpha.14](https://github.com/algolia/algoliasearch-client-ruby/compare/3.0.0.alpha.13...3.0.0.alpha.14)
2
+
3
+ - [7dc719cbe](https://github.com/algolia/api-clients-automation/commit/7dc719cbe) fix(specs): make languages an enum ([#2865](https://github.com/algolia/api-clients-automation/pull/2865)) by [@kai687](https://github.com/kai687/)
4
+
1
5
  ## [3.0.0.alpha.13](https://github.com/algolia/algoliasearch-client-ruby/compare/3.0.0.alpha.12...3.0.0.alpha.13)
2
6
 
3
7
  - [0f8d4432b](https://github.com/algolia/api-clients-automation/commit/0f8d4432b) feat(specs): insights api reference ([#2859](https://github.com/algolia/api-clients-automation/pull/2859)) by [@kai687](https://github.com/kai687/)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- algolia (3.0.0.alpha.13)
4
+ algolia (3.0.0.alpha.14)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-net_http_persistent (>= 0.15, < 3)
7
7
  net-http-persistent
@@ -147,7 +147,7 @@ module Algolia
147
147
  # Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `é` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics.
148
148
  attr_accessor :keep_diacritics_on_characters
149
149
 
150
- # [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
150
+ # Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
151
151
  attr_accessor :query_languages
152
152
 
153
153
  # Whether to split compound words 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.
@@ -384,7 +384,7 @@ module Algolia
384
384
  :ignore_plurals => :IgnorePlurals,
385
385
  :remove_stop_words => :RemoveStopWords,
386
386
  :keep_diacritics_on_characters => :String,
387
- :query_languages => :'Array<String>',
387
+ :query_languages => :'Array<SupportedLanguage>',
388
388
  :decompound_query => :Boolean,
389
389
  :enable_rules => :Boolean,
390
390
  :enable_personalization => :Boolean,
@@ -11,7 +11,7 @@ module Algolia
11
11
  # List of class defined in oneOf (OpenAPI v3)
12
12
  def openapi_one_of
13
13
  [
14
- :'Array<String>',
14
+ :'Array<SupportedLanguage>',
15
15
  :Boolean
16
16
  ]
17
17
  end
@@ -60,7 +60,7 @@ module Algolia
60
60
  # Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `é` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics.
61
61
  attr_accessor :keep_diacritics_on_characters
62
62
 
63
- # [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
63
+ # Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
64
64
  attr_accessor :query_languages
65
65
 
66
66
  # Whether to split compound words 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.
@@ -226,7 +226,7 @@ module Algolia
226
226
  :ignore_plurals => :IgnorePlurals,
227
227
  :remove_stop_words => :RemoveStopWords,
228
228
  :keep_diacritics_on_characters => :String,
229
- :query_languages => :'Array<String>',
229
+ :query_languages => :'Array<SupportedLanguage>',
230
230
  :decompound_query => :Boolean,
231
231
  :enable_rules => :Boolean,
232
232
  :enable_personalization => :Boolean,
@@ -150,7 +150,7 @@ module Algolia
150
150
  # Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `é` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics.
151
151
  attr_accessor :keep_diacritics_on_characters
152
152
 
153
- # [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
153
+ # Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
154
154
  attr_accessor :query_languages
155
155
 
156
156
  # Whether to split compound words 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.
@@ -380,7 +380,7 @@ module Algolia
380
380
  :ignore_plurals => :IgnorePlurals,
381
381
  :remove_stop_words => :RemoveStopWords,
382
382
  :keep_diacritics_on_characters => :String,
383
- :query_languages => :'Array<String>',
383
+ :query_languages => :'Array<SupportedLanguage>',
384
384
  :decompound_query => :Boolean,
385
385
  :enable_rules => :Boolean,
386
386
  :enable_personalization => :Boolean,
@@ -11,7 +11,7 @@ module Algolia
11
11
  # List of class defined in oneOf (OpenAPI v3)
12
12
  def openapi_one_of
13
13
  [
14
- :'Array<String>',
14
+ :'Array<SupportedLanguage>',
15
15
  :Boolean
16
16
  ]
17
17
  end
@@ -150,7 +150,7 @@ module Algolia
150
150
  # Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `é` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics.
151
151
  attr_accessor :keep_diacritics_on_characters
152
152
 
153
- # [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
153
+ # Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
154
154
  attr_accessor :query_languages
155
155
 
156
156
  # Whether to split compound words 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.
@@ -380,7 +380,7 @@ module Algolia
380
380
  :ignore_plurals => :IgnorePlurals,
381
381
  :remove_stop_words => :RemoveStopWords,
382
382
  :keep_diacritics_on_characters => :String,
383
- :query_languages => :'Array<String>',
383
+ :query_languages => :'Array<SupportedLanguage>',
384
384
  :decompound_query => :Boolean,
385
385
  :enable_rules => :Boolean,
386
386
  :enable_personalization => :Boolean,
@@ -0,0 +1,100 @@
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
+
3
+ require 'date'
4
+ require 'time'
5
+
6
+ module Algolia
7
+ module Recommend
8
+ class SupportedLanguage
9
+ AF = "af".freeze
10
+ AR = "ar".freeze
11
+ AZ = "az".freeze
12
+ BG = "bg".freeze
13
+ BN = "bn".freeze
14
+ CA = "ca".freeze
15
+ CS = "cs".freeze
16
+ CY = "cy".freeze
17
+ DA = "da".freeze
18
+ DE = "de".freeze
19
+ EL = "el".freeze
20
+ EN = "en".freeze
21
+ EO = "eo".freeze
22
+ ES = "es".freeze
23
+ ET = "et".freeze
24
+ EU = "eu".freeze
25
+ FA = "fa".freeze
26
+ FI = "fi".freeze
27
+ FO = "fo".freeze
28
+ FR = "fr".freeze
29
+ GA = "ga".freeze
30
+ GL = "gl".freeze
31
+ HE = "he".freeze
32
+ HI = "hi".freeze
33
+ HU = "hu".freeze
34
+ HY = "hy".freeze
35
+ ID = "id".freeze
36
+ IS = "is".freeze
37
+ IT = "it".freeze
38
+ JA = "ja".freeze
39
+ KA = "ka".freeze
40
+ KK = "kk".freeze
41
+ KO = "ko".freeze
42
+ KU = "ku".freeze
43
+ KY = "ky".freeze
44
+ LT = "lt".freeze
45
+ LV = "lv".freeze
46
+ MI = "mi".freeze
47
+ MN = "mn".freeze
48
+ MR = "mr".freeze
49
+ MS = "ms".freeze
50
+ MT = "mt".freeze
51
+ NB = "nb".freeze
52
+ NL = "nl".freeze
53
+ NO = "no".freeze
54
+ NS = "ns".freeze
55
+ PL = "pl".freeze
56
+ PS = "ps".freeze
57
+ PT = "pt".freeze
58
+ PT_BR = "pt-br".freeze
59
+ QU = "qu".freeze
60
+ RO = "ro".freeze
61
+ RU = "ru".freeze
62
+ SK = "sk".freeze
63
+ SQ = "sq".freeze
64
+ SV = "sv".freeze
65
+ SW = "sw".freeze
66
+ TA = "ta".freeze
67
+ TE = "te".freeze
68
+ TH = "th".freeze
69
+ TL = "tl".freeze
70
+ TN = "tn".freeze
71
+ TR = "tr".freeze
72
+ TT = "tt".freeze
73
+ UK = "uk".freeze
74
+ UR = "ur".freeze
75
+ UZ = "uz".freeze
76
+ ZH = "zh".freeze
77
+
78
+ def self.all_vars
79
+ @all_vars ||= [AF, AR, AZ, BG, BN, CA, CS, CY, DA, DE, EL, EN, EO, ES, ET, EU, FA, FI, FO, FR, GA, GL, HE, HI, HU, HY, ID, IS, IT, JA, KA, KK, KO, KU, KY, LT, LV, MI, MN,
80
+ MR, MS, MT, NB, NL, NO, NS, PL, PS, PT, PT_BR, QU, RO, RU, SK, SQ, SV, SW, TA, TE, TH, TL, TN, TR, TT, UK, UR, UZ, ZH].freeze
81
+ end
82
+
83
+ # Builds the enum from string
84
+ # @param [String] The enum value in the form of the string
85
+ # @return [String] The enum value
86
+ def self.build_from_hash(value)
87
+ new.build_from_hash(value)
88
+ end
89
+
90
+ # Builds the enum from string
91
+ # @param [String] The enum value in the form of the string
92
+ # @return [String] The enum value
93
+ def build_from_hash(value)
94
+ return value if SupportedLanguage.all_vars.include?(value)
95
+
96
+ raise "Invalid ENUM value #{value} for class #SupportedLanguage"
97
+ end
98
+ end
99
+ end
100
+ end
@@ -30,7 +30,7 @@ module Algolia
30
30
  # Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`).
31
31
  attr_accessor :decompounded_attributes
32
32
 
33
- # [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
33
+ # Languages for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
34
34
  attr_accessor :index_languages
35
35
 
36
36
  # Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search).
@@ -96,7 +96,7 @@ module Algolia
96
96
  :attributes_to_transliterate => :'Array<String>',
97
97
  :camel_case_attributes => :'Array<String>',
98
98
  :decompounded_attributes => :Object,
99
- :index_languages => :'Array<String>',
99
+ :index_languages => :'Array<SupportedLanguage>',
100
100
  :disable_prefix_on_attributes => :'Array<String>',
101
101
  :allow_compression_of_integer_array => :Boolean,
102
102
  :numeric_attributes_for_filtering => :'Array<String>',
@@ -150,7 +150,7 @@ module Algolia
150
150
  # Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `é` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics.
151
151
  attr_accessor :keep_diacritics_on_characters
152
152
 
153
- # [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
153
+ # Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
154
154
  attr_accessor :query_languages
155
155
 
156
156
  # Whether to split compound words 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.
@@ -384,7 +384,7 @@ module Algolia
384
384
  :ignore_plurals => :IgnorePlurals,
385
385
  :remove_stop_words => :RemoveStopWords,
386
386
  :keep_diacritics_on_characters => :String,
387
- :query_languages => :'Array<String>',
387
+ :query_languages => :'Array<SupportedLanguage>',
388
388
  :decompound_query => :Boolean,
389
389
  :enable_rules => :Boolean,
390
390
  :enable_personalization => :Boolean,
@@ -147,7 +147,7 @@ module Algolia
147
147
  # Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `é` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics.
148
148
  attr_accessor :keep_diacritics_on_characters
149
149
 
150
- # [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
150
+ # Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
151
151
  attr_accessor :query_languages
152
152
 
153
153
  # Whether to split compound words 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.
@@ -384,7 +384,7 @@ module Algolia
384
384
  :ignore_plurals => :IgnorePlurals,
385
385
  :remove_stop_words => :RemoveStopWords,
386
386
  :keep_diacritics_on_characters => :String,
387
- :query_languages => :'Array<String>',
387
+ :query_languages => :'Array<SupportedLanguage>',
388
388
  :decompound_query => :Boolean,
389
389
  :enable_rules => :Boolean,
390
390
  :enable_personalization => :Boolean,
@@ -10,7 +10,6 @@ module Algolia
10
10
  # Unique identifier for the dictionary entry.
11
11
  attr_accessor :object_id
12
12
 
13
- # ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/).
14
13
  attr_accessor :language
15
14
 
16
15
  # Matching dictionary word for `stopwords` and `compounds` dictionaries.
@@ -69,7 +68,7 @@ module Algolia
69
68
  def self.types_mapping
70
69
  {
71
70
  :object_id => :String,
72
- :language => :String,
71
+ :language => :SupportedLanguage,
73
72
  :word => :String,
74
73
  :words => :'Array<String>',
75
74
  :decomposition => :'Array<String>',
@@ -11,7 +11,7 @@ module Algolia
11
11
  # List of class defined in oneOf (OpenAPI v3)
12
12
  def openapi_one_of
13
13
  [
14
- :'Array<String>',
14
+ :'Array<SupportedLanguage>',
15
15
  :Boolean
16
16
  ]
17
17
  end
@@ -31,7 +31,7 @@ module Algolia
31
31
  # Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`).
32
32
  attr_accessor :decompounded_attributes
33
33
 
34
- # [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
34
+ # Languages for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
35
35
  attr_accessor :index_languages
36
36
 
37
37
  # Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search).
@@ -112,7 +112,7 @@ module Algolia
112
112
  # Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `é` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics.
113
113
  attr_accessor :keep_diacritics_on_characters
114
114
 
115
- # [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
115
+ # Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
116
116
  attr_accessor :query_languages
117
117
 
118
118
  # Whether to split compound words 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.
@@ -284,7 +284,7 @@ module Algolia
284
284
  :attributes_to_transliterate => :'Array<String>',
285
285
  :camel_case_attributes => :'Array<String>',
286
286
  :decompounded_attributes => :Object,
287
- :index_languages => :'Array<String>',
287
+ :index_languages => :'Array<SupportedLanguage>',
288
288
  :disable_prefix_on_attributes => :'Array<String>',
289
289
  :allow_compression_of_integer_array => :Boolean,
290
290
  :numeric_attributes_for_filtering => :'Array<String>',
@@ -312,7 +312,7 @@ module Algolia
312
312
  :ignore_plurals => :IgnorePlurals,
313
313
  :remove_stop_words => :RemoveStopWords,
314
314
  :keep_diacritics_on_characters => :String,
315
- :query_languages => :'Array<String>',
315
+ :query_languages => :'Array<SupportedLanguage>',
316
316
  :decompound_query => :Boolean,
317
317
  :enable_rules => :Boolean,
318
318
  :enable_personalization => :Boolean,
@@ -60,7 +60,7 @@ module Algolia
60
60
  # Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `é` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics.
61
61
  attr_accessor :keep_diacritics_on_characters
62
62
 
63
- # [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
63
+ # Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
64
64
  attr_accessor :query_languages
65
65
 
66
66
  # Whether to split compound words 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.
@@ -226,7 +226,7 @@ module Algolia
226
226
  :ignore_plurals => :IgnorePlurals,
227
227
  :remove_stop_words => :RemoveStopWords,
228
228
  :keep_diacritics_on_characters => :String,
229
- :query_languages => :'Array<String>',
229
+ :query_languages => :'Array<SupportedLanguage>',
230
230
  :decompound_query => :Boolean,
231
231
  :enable_rules => :Boolean,
232
232
  :enable_personalization => :Boolean,
@@ -11,7 +11,7 @@ module Algolia
11
11
  # List of class defined in oneOf (OpenAPI v3)
12
12
  def openapi_one_of
13
13
  [
14
- :'Array<String>',
14
+ :'Array<SupportedLanguage>',
15
15
  :Boolean
16
16
  ]
17
17
  end
@@ -16,9 +16,30 @@ module Algolia
16
16
  # Number of hits per page.
17
17
  attr_accessor :hits_per_page
18
18
 
19
- # ISO code of a [supported language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/).
20
19
  attr_accessor :language
21
20
 
21
+ class EnumAttributeValidator
22
+ attr_reader :datatype
23
+ attr_reader :allowable_values
24
+
25
+ def initialize(datatype, allowable_values)
26
+ @allowable_values = allowable_values.map do |value|
27
+ case datatype.to_s
28
+ when /Integer/i
29
+ value.to_i
30
+ when /Float/i
31
+ value.to_f
32
+ else
33
+ value
34
+ end
35
+ end
36
+ end
37
+
38
+ def valid?(value)
39
+ !value || allowable_values.include?(value)
40
+ end
41
+ end
42
+
22
43
  # Attribute mapping from ruby-style variable name to JSON key.
23
44
  def self.attribute_map
24
45
  {
@@ -40,7 +61,7 @@ module Algolia
40
61
  :query => :String,
41
62
  :page => :Integer,
42
63
  :hits_per_page => :Integer,
43
- :language => :String
64
+ :language => :SupportedLanguage
44
65
  }
45
66
  end
46
67
 
@@ -153,7 +153,7 @@ module Algolia
153
153
  # Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `é` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics.
154
154
  attr_accessor :keep_diacritics_on_characters
155
155
 
156
- # [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
156
+ # Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
157
157
  attr_accessor :query_languages
158
158
 
159
159
  # Whether to split compound words 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.
@@ -400,7 +400,7 @@ module Algolia
400
400
  :ignore_plurals => :IgnorePlurals,
401
401
  :remove_stop_words => :RemoveStopWords,
402
402
  :keep_diacritics_on_characters => :String,
403
- :query_languages => :'Array<String>',
403
+ :query_languages => :'Array<SupportedLanguage>',
404
404
  :decompound_query => :Boolean,
405
405
  :enable_rules => :Boolean,
406
406
  :enable_personalization => :Boolean,
@@ -153,7 +153,7 @@ module Algolia
153
153
  # Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `é` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics.
154
154
  attr_accessor :keep_diacritics_on_characters
155
155
 
156
- # [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
156
+ # Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
157
157
  attr_accessor :query_languages
158
158
 
159
159
  # Whether to split compound words 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.
@@ -392,7 +392,7 @@ module Algolia
392
392
  :ignore_plurals => :IgnorePlurals,
393
393
  :remove_stop_words => :RemoveStopWords,
394
394
  :keep_diacritics_on_characters => :String,
395
- :query_languages => :'Array<String>',
395
+ :query_languages => :'Array<SupportedLanguage>',
396
396
  :decompound_query => :Boolean,
397
397
  :enable_rules => :Boolean,
398
398
  :enable_personalization => :Boolean,
@@ -150,7 +150,7 @@ module Algolia
150
150
  # Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `é` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics.
151
151
  attr_accessor :keep_diacritics_on_characters
152
152
 
153
- # [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
153
+ # Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
154
154
  attr_accessor :query_languages
155
155
 
156
156
  # Whether to split compound words 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.
@@ -380,7 +380,7 @@ module Algolia
380
380
  :ignore_plurals => :IgnorePlurals,
381
381
  :remove_stop_words => :RemoveStopWords,
382
382
  :keep_diacritics_on_characters => :String,
383
- :query_languages => :'Array<String>',
383
+ :query_languages => :'Array<SupportedLanguage>',
384
384
  :decompound_query => :Boolean,
385
385
  :enable_rules => :Boolean,
386
386
  :enable_personalization => :Boolean,
@@ -0,0 +1,100 @@
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
+
3
+ require 'date'
4
+ require 'time'
5
+
6
+ module Algolia
7
+ module Search
8
+ class SupportedLanguage
9
+ AF = "af".freeze
10
+ AR = "ar".freeze
11
+ AZ = "az".freeze
12
+ BG = "bg".freeze
13
+ BN = "bn".freeze
14
+ CA = "ca".freeze
15
+ CS = "cs".freeze
16
+ CY = "cy".freeze
17
+ DA = "da".freeze
18
+ DE = "de".freeze
19
+ EL = "el".freeze
20
+ EN = "en".freeze
21
+ EO = "eo".freeze
22
+ ES = "es".freeze
23
+ ET = "et".freeze
24
+ EU = "eu".freeze
25
+ FA = "fa".freeze
26
+ FI = "fi".freeze
27
+ FO = "fo".freeze
28
+ FR = "fr".freeze
29
+ GA = "ga".freeze
30
+ GL = "gl".freeze
31
+ HE = "he".freeze
32
+ HI = "hi".freeze
33
+ HU = "hu".freeze
34
+ HY = "hy".freeze
35
+ ID = "id".freeze
36
+ IS = "is".freeze
37
+ IT = "it".freeze
38
+ JA = "ja".freeze
39
+ KA = "ka".freeze
40
+ KK = "kk".freeze
41
+ KO = "ko".freeze
42
+ KU = "ku".freeze
43
+ KY = "ky".freeze
44
+ LT = "lt".freeze
45
+ LV = "lv".freeze
46
+ MI = "mi".freeze
47
+ MN = "mn".freeze
48
+ MR = "mr".freeze
49
+ MS = "ms".freeze
50
+ MT = "mt".freeze
51
+ NB = "nb".freeze
52
+ NL = "nl".freeze
53
+ NO = "no".freeze
54
+ NS = "ns".freeze
55
+ PL = "pl".freeze
56
+ PS = "ps".freeze
57
+ PT = "pt".freeze
58
+ PT_BR = "pt-br".freeze
59
+ QU = "qu".freeze
60
+ RO = "ro".freeze
61
+ RU = "ru".freeze
62
+ SK = "sk".freeze
63
+ SQ = "sq".freeze
64
+ SV = "sv".freeze
65
+ SW = "sw".freeze
66
+ TA = "ta".freeze
67
+ TE = "te".freeze
68
+ TH = "th".freeze
69
+ TL = "tl".freeze
70
+ TN = "tn".freeze
71
+ TR = "tr".freeze
72
+ TT = "tt".freeze
73
+ UK = "uk".freeze
74
+ UR = "ur".freeze
75
+ UZ = "uz".freeze
76
+ ZH = "zh".freeze
77
+
78
+ def self.all_vars
79
+ @all_vars ||= [AF, AR, AZ, BG, BN, CA, CS, CY, DA, DE, EL, EN, EO, ES, ET, EU, FA, FI, FO, FR, GA, GL, HE, HI, HU, HY, ID, IS, IT, JA, KA, KK, KO, KU, KY, LT, LV, MI, MN,
80
+ MR, MS, MT, NB, NL, NO, NS, PL, PS, PT, PT_BR, QU, RO, RU, SK, SQ, SV, SW, TA, TE, TH, TL, TN, TR, TT, UK, UR, UZ, ZH].freeze
81
+ end
82
+
83
+ # Builds the enum from string
84
+ # @param [String] The enum value in the form of the string
85
+ # @return [String] The enum value
86
+ def self.build_from_hash(value)
87
+ new.build_from_hash(value)
88
+ end
89
+
90
+ # Builds the enum from string
91
+ # @param [String] The enum value in the form of the string
92
+ # @return [String] The enum value
93
+ def build_from_hash(value)
94
+ return value if SupportedLanguage.all_vars.include?(value)
95
+
96
+ raise "Invalid ENUM value #{value} for class #SupportedLanguage"
97
+ end
98
+ end
99
+ end
100
+ 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.0.0.alpha.13'.freeze
4
+ VERSION = '3.0.0.alpha.14'.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.0.0.alpha.13
4
+ version: 3.0.0.alpha.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Algolia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-13 00:00:00.000000000 Z
11
+ date: 2024-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -464,6 +464,7 @@ files:
464
464
  - lib/algolia/models/recommend/snippet_result.rb
465
465
  - lib/algolia/models/recommend/snippet_result_option.rb
466
466
  - lib/algolia/models/recommend/sort_remaining_by.rb
467
+ - lib/algolia/models/recommend/supported_language.rb
467
468
  - lib/algolia/models/recommend/tag_filters.rb
468
469
  - lib/algolia/models/recommend/task_status.rb
469
470
  - lib/algolia/models/recommend/trending_facet_hit.rb
@@ -624,6 +625,7 @@ files:
624
625
  - lib/algolia/models/search/sort_remaining_by.rb
625
626
  - lib/algolia/models/search/source.rb
626
627
  - lib/algolia/models/search/standard_entries.rb
628
+ - lib/algolia/models/search/supported_language.rb
627
629
  - lib/algolia/models/search/synonym_hit.rb
628
630
  - lib/algolia/models/search/synonym_type.rb
629
631
  - lib/algolia/models/search/tag_filters.rb