algolia 3.31.0 → 3.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/Gemfile.lock +1 -1
- data/lib/algolia/api/composition_client.rb +2 -2
- data/lib/algolia/models/composition/params.rb +197 -186
- data/lib/algolia/models/ingestion/run_reason_code.rb +4 -2
- data/lib/algolia/models/ingestion/run_status.rb +1 -2
- data/lib/algolia/models/ingestion/source_commercetools.rb +20 -1
- data/lib/algolia/models/ingestion/source_update_commercetools.rb +19 -1
- data/lib/algolia/models/search/rule.rb +24 -4
- data/lib/algolia/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '038b9815e3e19a8df7af2d45f9479a21a50ec39fd9126a9faa6257cfce01a9d7'
|
|
4
|
+
data.tar.gz: 40c503e65285a2ba1b6d65d95cfc63a1969eba47df7c7e94b156f7d83633f981
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5fe1da3a8c32637095019905d0efa909e9efb92c68029e9981a2dfc27d97c588c7ee958817c3afe7edaf84aa7007dc4a0c2635e4f23620d6c9e473a9544ec4e3
|
|
7
|
+
data.tar.gz: 7f2497efdd53881975f361874a3a3de1790025b4e4e54bf4222a1f06fb539ee6fdfb80477e904ed0806958ae0b2b5adb39239b754737fb5cf077a96318b281ac
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## [3.33.0](https://github.com/algolia/algoliasearch-client-ruby/compare/3.32.0...3.33.0)
|
|
2
|
+
|
|
3
|
+
- [6a48ef151a](https://github.com/algolia/api-clients-automation/commit/6a48ef151a) feat(specs): allow `enablePersonalization` query parameter at run time for Composition API ([#5651](https://github.com/algolia/api-clients-automation/pull/5651)) by [@ClaraMuller](https://github.com/ClaraMuller/)
|
|
4
|
+
|
|
5
|
+
## [3.32.0](https://github.com/algolia/algoliasearch-client-ruby/compare/3.31.0...3.32.0)
|
|
6
|
+
|
|
7
|
+
- [7d189e024](https://github.com/algolia/api-clients-automation/commit/7d189e024) feat(specs): add useImagesObjects property in commercetools source input ([#5586](https://github.com/algolia/api-clients-automation/pull/5586)) by [@sbellone](https://github.com/sbellone/)
|
|
8
|
+
- [ee5542a32](https://github.com/algolia/api-clients-automation/commit/ee5542a32) fix(specs): Add title values to key oneOfs ([#5581](https://github.com/algolia/api-clients-automation/pull/5581)) by [@gazconroy](https://github.com/gazconroy/)
|
|
9
|
+
- [354d28b7c](https://github.com/algolia/api-clients-automation/commit/354d28b7c) fix(specs): update run reason in observability ([#5623](https://github.com/algolia/api-clients-automation/pull/5623)) by [@millotp](https://github.com/millotp/)
|
|
10
|
+
- [ae9ac597f](https://github.com/algolia/api-clients-automation/commit/ae9ac597f) fix(specs): add tags and scope to rules ([#5625](https://github.com/algolia/api-clients-automation/pull/5625)) by [@millotp](https://github.com/millotp/)
|
|
11
|
+
|
|
1
12
|
## [3.31.0](https://github.com/algolia/algoliasearch-client-ruby/compare/3.30.0...3.31.0)
|
|
2
13
|
|
|
3
14
|
- [ecfea56dc](https://github.com/algolia/api-clients-automation/commit/ecfea56dc) feat(clients): remove schedule capabilities ([#5552](https://github.com/algolia/api-clients-automation/pull/5552)) by [@cdhawke](https://github.com/cdhawke/)
|
data/Gemfile.lock
CHANGED
|
@@ -595,7 +595,7 @@ module Algolia
|
|
|
595
595
|
)
|
|
596
596
|
end
|
|
597
597
|
|
|
598
|
-
#
|
|
598
|
+
# Update and insert a composition in the current Algolia application.
|
|
599
599
|
#
|
|
600
600
|
# Required API Key ACLs:
|
|
601
601
|
# - editSettings
|
|
@@ -635,7 +635,7 @@ module Algolia
|
|
|
635
635
|
@api_client.call_api(:PUT, path, new_options)
|
|
636
636
|
end
|
|
637
637
|
|
|
638
|
-
#
|
|
638
|
+
# Update and insert a composition in the current Algolia application.
|
|
639
639
|
#
|
|
640
640
|
# Required API Key ACLs:
|
|
641
641
|
# - editSettings
|
|
@@ -8,149 +8,154 @@ require "time"
|
|
|
8
8
|
module Algolia
|
|
9
9
|
module Composition
|
|
10
10
|
class Params
|
|
11
|
-
#
|
|
12
|
-
attr_accessor :
|
|
11
|
+
# Whether this search will be included in Analytics.
|
|
12
|
+
attr_accessor :analytics
|
|
13
13
|
|
|
14
|
-
#
|
|
15
|
-
attr_accessor :
|
|
14
|
+
# Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).
|
|
15
|
+
attr_accessor :analytics_tags
|
|
16
16
|
|
|
17
|
-
#
|
|
18
|
-
attr_accessor :
|
|
17
|
+
# Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within a circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.
|
|
18
|
+
attr_accessor :around_lat_lng
|
|
19
19
|
|
|
20
|
-
# Whether the
|
|
21
|
-
attr_accessor :
|
|
20
|
+
# Whether to obtain the coordinates from the request's IP address.
|
|
21
|
+
attr_accessor :around_lat_lng_via_ip
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
attr_accessor :around_radius
|
|
24
|
+
|
|
25
|
+
attr_accessor :around_precision
|
|
26
|
+
|
|
27
|
+
# Whether to include a `queryID` attribute in the response The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/doc/guides/sending-events/getting-started).
|
|
28
|
+
attr_accessor :click_analytics
|
|
29
|
+
|
|
30
|
+
# Whether to enable index level A/B testing for this run request. If the composition mixes multiple indices, the A/B test is ignored.
|
|
31
|
+
attr_accessor :enable_ab_test
|
|
32
|
+
|
|
33
|
+
# Whether to enable Personalization.
|
|
34
|
+
attr_accessor :enable_personalization
|
|
35
|
+
|
|
36
|
+
# Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking) This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.
|
|
37
|
+
attr_accessor :enable_re_ranking
|
|
38
|
+
|
|
39
|
+
# Whether to enable composition rules.
|
|
40
|
+
attr_accessor :enable_rules
|
|
25
41
|
|
|
26
42
|
attr_accessor :facet_filters
|
|
27
43
|
|
|
28
44
|
# Facets for which to retrieve facet values that match the search criteria and the number of matching facet values To retrieve all facets, use the wildcard character `*`. To retrieve disjunctive facets lists, annotate any facets with the `disjunctive` modifier. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts) and [disjunctive faceting for Smart Groups](https://www.algolia.com/doc/guides/managing-results/compositions/search-based-groups#facets-including-disjunctive-faceting).
|
|
29
45
|
attr_accessor :facets
|
|
30
46
|
|
|
31
|
-
|
|
47
|
+
# Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering).
|
|
48
|
+
attr_accessor :filters
|
|
32
49
|
|
|
33
|
-
|
|
50
|
+
# Whether the run response should include detailed ranking information.
|
|
51
|
+
attr_accessor :get_ranking_info
|
|
34
52
|
|
|
35
53
|
# Number of hits per page.
|
|
36
54
|
attr_accessor :hits_per_page
|
|
37
55
|
|
|
38
|
-
#
|
|
39
|
-
attr_accessor :
|
|
40
|
-
|
|
41
|
-
# Whether to obtain the coordinates from the request's IP address.
|
|
42
|
-
attr_accessor :around_lat_lng_via_ip
|
|
43
|
-
|
|
44
|
-
attr_accessor :around_radius
|
|
45
|
-
|
|
46
|
-
attr_accessor :around_precision
|
|
47
|
-
|
|
48
|
-
# Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.
|
|
49
|
-
attr_accessor :minimum_around_radius
|
|
56
|
+
# A list of extenrally injected objectID groups into from an external source.
|
|
57
|
+
attr_accessor :injected_items
|
|
50
58
|
|
|
51
59
|
attr_accessor :inside_bounding_box
|
|
52
60
|
|
|
53
61
|
# Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored if you also specify `insideBoundingBox`.
|
|
54
62
|
attr_accessor :inside_polygon
|
|
55
63
|
|
|
56
|
-
#
|
|
57
|
-
attr_accessor :
|
|
64
|
+
# Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.
|
|
65
|
+
attr_accessor :minimum_around_radius
|
|
58
66
|
|
|
59
67
|
# ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches) - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`.
|
|
60
68
|
attr_accessor :natural_languages
|
|
61
69
|
|
|
62
|
-
|
|
63
|
-
attr_accessor :enable_rules
|
|
64
|
-
|
|
65
|
-
# Assigns a rule context to the run query [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules.
|
|
66
|
-
attr_accessor :rule_contexts
|
|
70
|
+
attr_accessor :numeric_filters
|
|
67
71
|
|
|
68
|
-
|
|
69
|
-
attr_accessor :user_token
|
|
72
|
+
attr_accessor :optional_filters
|
|
70
73
|
|
|
71
|
-
#
|
|
72
|
-
attr_accessor :
|
|
74
|
+
# Page of search results to retrieve.
|
|
75
|
+
attr_accessor :page
|
|
73
76
|
|
|
74
|
-
#
|
|
75
|
-
attr_accessor :
|
|
77
|
+
# Search query.
|
|
78
|
+
attr_accessor :query
|
|
76
79
|
|
|
77
|
-
#
|
|
78
|
-
attr_accessor :
|
|
80
|
+
# Relevancy threshold below which less relevant results aren't included in the results You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results.
|
|
81
|
+
attr_accessor :relevancy_strictness
|
|
79
82
|
|
|
80
|
-
#
|
|
81
|
-
attr_accessor :
|
|
83
|
+
# 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).
|
|
84
|
+
attr_accessor :query_languages
|
|
82
85
|
|
|
83
|
-
#
|
|
84
|
-
attr_accessor :
|
|
86
|
+
# Assigns a rule context to the run query [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules.
|
|
87
|
+
attr_accessor :rule_contexts
|
|
85
88
|
|
|
86
|
-
#
|
|
87
|
-
attr_accessor :
|
|
89
|
+
# Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken).
|
|
90
|
+
attr_accessor :user_token
|
|
88
91
|
|
|
89
92
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
90
93
|
def self.attribute_map
|
|
91
94
|
{
|
|
92
|
-
:
|
|
93
|
-
:
|
|
94
|
-
:page => :page,
|
|
95
|
-
:get_ranking_info => :getRankingInfo,
|
|
96
|
-
:relevancy_strictness => :relevancyStrictness,
|
|
97
|
-
:facet_filters => :facetFilters,
|
|
98
|
-
:facets => :facets,
|
|
99
|
-
:optional_filters => :optionalFilters,
|
|
100
|
-
:numeric_filters => :numericFilters,
|
|
101
|
-
:hits_per_page => :hitsPerPage,
|
|
95
|
+
:analytics => :analytics,
|
|
96
|
+
:analytics_tags => :analyticsTags,
|
|
102
97
|
:around_lat_lng => :aroundLatLng,
|
|
103
98
|
:around_lat_lng_via_ip => :aroundLatLngViaIP,
|
|
104
99
|
:around_radius => :aroundRadius,
|
|
105
100
|
:around_precision => :aroundPrecision,
|
|
106
|
-
:
|
|
101
|
+
:click_analytics => :clickAnalytics,
|
|
102
|
+
:enable_ab_test => :enableABTest,
|
|
103
|
+
:enable_personalization => :enablePersonalization,
|
|
104
|
+
:enable_re_ranking => :enableReRanking,
|
|
105
|
+
:enable_rules => :enableRules,
|
|
106
|
+
:facet_filters => :facetFilters,
|
|
107
|
+
:facets => :facets,
|
|
108
|
+
:filters => :filters,
|
|
109
|
+
:get_ranking_info => :getRankingInfo,
|
|
110
|
+
:hits_per_page => :hitsPerPage,
|
|
111
|
+
:injected_items => :injectedItems,
|
|
107
112
|
:inside_bounding_box => :insideBoundingBox,
|
|
108
113
|
:inside_polygon => :insidePolygon,
|
|
109
|
-
:
|
|
114
|
+
:minimum_around_radius => :minimumAroundRadius,
|
|
110
115
|
:natural_languages => :naturalLanguages,
|
|
111
|
-
:
|
|
116
|
+
:numeric_filters => :numericFilters,
|
|
117
|
+
:optional_filters => :optionalFilters,
|
|
118
|
+
:page => :page,
|
|
119
|
+
:query => :query,
|
|
120
|
+
:relevancy_strictness => :relevancyStrictness,
|
|
121
|
+
:query_languages => :queryLanguages,
|
|
112
122
|
:rule_contexts => :ruleContexts,
|
|
113
|
-
:user_token => :userToken
|
|
114
|
-
:click_analytics => :clickAnalytics,
|
|
115
|
-
:analytics => :analytics,
|
|
116
|
-
:analytics_tags => :analyticsTags,
|
|
117
|
-
:enable_ab_test => :enableABTest,
|
|
118
|
-
:enable_re_ranking => :enableReRanking,
|
|
119
|
-
:injected_items => :injectedItems
|
|
123
|
+
:user_token => :userToken
|
|
120
124
|
}
|
|
121
125
|
end
|
|
122
126
|
|
|
123
127
|
# Attribute type mapping.
|
|
124
128
|
def self.types_mapping
|
|
125
129
|
{
|
|
126
|
-
:
|
|
127
|
-
:
|
|
128
|
-
:page => :"Integer",
|
|
129
|
-
:get_ranking_info => :"Boolean",
|
|
130
|
-
:relevancy_strictness => :"Integer",
|
|
131
|
-
:facet_filters => :"FacetFilters",
|
|
132
|
-
:facets => :"Array<String>",
|
|
133
|
-
:optional_filters => :"OptionalFilters",
|
|
134
|
-
:numeric_filters => :"NumericFilters",
|
|
135
|
-
:hits_per_page => :"Integer",
|
|
130
|
+
:analytics => :"Boolean",
|
|
131
|
+
:analytics_tags => :"Array<String>",
|
|
136
132
|
:around_lat_lng => :"String",
|
|
137
133
|
:around_lat_lng_via_ip => :"Boolean",
|
|
138
134
|
:around_radius => :"AroundRadius",
|
|
139
135
|
:around_precision => :"AroundPrecision",
|
|
140
|
-
:
|
|
136
|
+
:click_analytics => :"Boolean",
|
|
137
|
+
:enable_ab_test => :"Boolean",
|
|
138
|
+
:enable_personalization => :"Boolean",
|
|
139
|
+
:enable_re_ranking => :"Boolean",
|
|
140
|
+
:enable_rules => :"Boolean",
|
|
141
|
+
:facet_filters => :"FacetFilters",
|
|
142
|
+
:facets => :"Array<String>",
|
|
143
|
+
:filters => :"String",
|
|
144
|
+
:get_ranking_info => :"Boolean",
|
|
145
|
+
:hits_per_page => :"Integer",
|
|
146
|
+
:injected_items => :"Hash<String, ExternalInjectedItem>",
|
|
141
147
|
:inside_bounding_box => :"InsideBoundingBox",
|
|
142
148
|
:inside_polygon => :"Array<Array<Float>>",
|
|
143
|
-
:
|
|
149
|
+
:minimum_around_radius => :"Integer",
|
|
144
150
|
:natural_languages => :"Array<SupportedLanguage>",
|
|
145
|
-
:
|
|
151
|
+
:numeric_filters => :"NumericFilters",
|
|
152
|
+
:optional_filters => :"OptionalFilters",
|
|
153
|
+
:page => :"Integer",
|
|
154
|
+
:query => :"String",
|
|
155
|
+
:relevancy_strictness => :"Integer",
|
|
156
|
+
:query_languages => :"Array<SupportedLanguage>",
|
|
146
157
|
:rule_contexts => :"Array<String>",
|
|
147
|
-
:user_token => :"String"
|
|
148
|
-
:click_analytics => :"Boolean",
|
|
149
|
-
:analytics => :"Boolean",
|
|
150
|
-
:analytics_tags => :"Array<String>",
|
|
151
|
-
:enable_ab_test => :"Boolean",
|
|
152
|
-
:enable_re_ranking => :"Boolean",
|
|
153
|
-
:injected_items => :"Hash<String, ExternalInjectedItem>"
|
|
158
|
+
:user_token => :"String"
|
|
154
159
|
}
|
|
155
160
|
end
|
|
156
161
|
|
|
@@ -183,66 +188,78 @@ module Algolia
|
|
|
183
188
|
h[k.to_sym] = v
|
|
184
189
|
}
|
|
185
190
|
|
|
186
|
-
if attributes.key?(:
|
|
187
|
-
self.
|
|
191
|
+
if attributes.key?(:analytics)
|
|
192
|
+
self.analytics = attributes[:analytics]
|
|
188
193
|
end
|
|
189
194
|
|
|
190
|
-
if attributes.key?(:
|
|
191
|
-
|
|
195
|
+
if attributes.key?(:analytics_tags)
|
|
196
|
+
if (value = attributes[:analytics_tags]).is_a?(Array)
|
|
197
|
+
self.analytics_tags = value
|
|
198
|
+
end
|
|
192
199
|
end
|
|
193
200
|
|
|
194
|
-
if attributes.key?(:
|
|
195
|
-
self.
|
|
201
|
+
if attributes.key?(:around_lat_lng)
|
|
202
|
+
self.around_lat_lng = attributes[:around_lat_lng]
|
|
196
203
|
end
|
|
197
204
|
|
|
198
|
-
if attributes.key?(:
|
|
199
|
-
self.
|
|
205
|
+
if attributes.key?(:around_lat_lng_via_ip)
|
|
206
|
+
self.around_lat_lng_via_ip = attributes[:around_lat_lng_via_ip]
|
|
200
207
|
end
|
|
201
208
|
|
|
202
|
-
if attributes.key?(:
|
|
203
|
-
self.
|
|
209
|
+
if attributes.key?(:around_radius)
|
|
210
|
+
self.around_radius = attributes[:around_radius]
|
|
204
211
|
end
|
|
205
212
|
|
|
206
|
-
if attributes.key?(:
|
|
207
|
-
self.
|
|
213
|
+
if attributes.key?(:around_precision)
|
|
214
|
+
self.around_precision = attributes[:around_precision]
|
|
208
215
|
end
|
|
209
216
|
|
|
210
|
-
if attributes.key?(:
|
|
211
|
-
|
|
212
|
-
self.facets = value
|
|
213
|
-
end
|
|
217
|
+
if attributes.key?(:click_analytics)
|
|
218
|
+
self.click_analytics = attributes[:click_analytics]
|
|
214
219
|
end
|
|
215
220
|
|
|
216
|
-
if attributes.key?(:
|
|
217
|
-
self.
|
|
221
|
+
if attributes.key?(:enable_ab_test)
|
|
222
|
+
self.enable_ab_test = attributes[:enable_ab_test]
|
|
218
223
|
end
|
|
219
224
|
|
|
220
|
-
if attributes.key?(:
|
|
221
|
-
self.
|
|
225
|
+
if attributes.key?(:enable_personalization)
|
|
226
|
+
self.enable_personalization = attributes[:enable_personalization]
|
|
222
227
|
end
|
|
223
228
|
|
|
224
|
-
if attributes.key?(:
|
|
225
|
-
self.
|
|
229
|
+
if attributes.key?(:enable_re_ranking)
|
|
230
|
+
self.enable_re_ranking = attributes[:enable_re_ranking]
|
|
226
231
|
end
|
|
227
232
|
|
|
228
|
-
if attributes.key?(:
|
|
229
|
-
self.
|
|
233
|
+
if attributes.key?(:enable_rules)
|
|
234
|
+
self.enable_rules = attributes[:enable_rules]
|
|
230
235
|
end
|
|
231
236
|
|
|
232
|
-
if attributes.key?(:
|
|
233
|
-
self.
|
|
237
|
+
if attributes.key?(:facet_filters)
|
|
238
|
+
self.facet_filters = attributes[:facet_filters]
|
|
234
239
|
end
|
|
235
240
|
|
|
236
|
-
if attributes.key?(:
|
|
237
|
-
|
|
241
|
+
if attributes.key?(:facets)
|
|
242
|
+
if (value = attributes[:facets]).is_a?(Array)
|
|
243
|
+
self.facets = value
|
|
244
|
+
end
|
|
238
245
|
end
|
|
239
246
|
|
|
240
|
-
if attributes.key?(:
|
|
241
|
-
self.
|
|
247
|
+
if attributes.key?(:filters)
|
|
248
|
+
self.filters = attributes[:filters]
|
|
242
249
|
end
|
|
243
250
|
|
|
244
|
-
if attributes.key?(:
|
|
245
|
-
self.
|
|
251
|
+
if attributes.key?(:get_ranking_info)
|
|
252
|
+
self.get_ranking_info = attributes[:get_ranking_info]
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
if attributes.key?(:hits_per_page)
|
|
256
|
+
self.hits_per_page = attributes[:hits_per_page]
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
if attributes.key?(:injected_items)
|
|
260
|
+
if (value = attributes[:injected_items]).is_a?(Hash)
|
|
261
|
+
self.injected_items = value
|
|
262
|
+
end
|
|
246
263
|
end
|
|
247
264
|
|
|
248
265
|
if attributes.key?(:inside_bounding_box)
|
|
@@ -255,10 +272,8 @@ module Algolia
|
|
|
255
272
|
end
|
|
256
273
|
end
|
|
257
274
|
|
|
258
|
-
if attributes.key?(:
|
|
259
|
-
|
|
260
|
-
self.query_languages = value
|
|
261
|
-
end
|
|
275
|
+
if attributes.key?(:minimum_around_radius)
|
|
276
|
+
self.minimum_around_radius = attributes[:minimum_around_radius]
|
|
262
277
|
end
|
|
263
278
|
|
|
264
279
|
if attributes.key?(:natural_languages)
|
|
@@ -267,46 +282,40 @@ module Algolia
|
|
|
267
282
|
end
|
|
268
283
|
end
|
|
269
284
|
|
|
270
|
-
if attributes.key?(:
|
|
271
|
-
self.
|
|
285
|
+
if attributes.key?(:numeric_filters)
|
|
286
|
+
self.numeric_filters = attributes[:numeric_filters]
|
|
272
287
|
end
|
|
273
288
|
|
|
274
|
-
if attributes.key?(:
|
|
275
|
-
|
|
276
|
-
self.rule_contexts = value
|
|
277
|
-
end
|
|
289
|
+
if attributes.key?(:optional_filters)
|
|
290
|
+
self.optional_filters = attributes[:optional_filters]
|
|
278
291
|
end
|
|
279
292
|
|
|
280
|
-
if attributes.key?(:
|
|
281
|
-
self.
|
|
293
|
+
if attributes.key?(:page)
|
|
294
|
+
self.page = attributes[:page]
|
|
282
295
|
end
|
|
283
296
|
|
|
284
|
-
if attributes.key?(:
|
|
285
|
-
self.
|
|
297
|
+
if attributes.key?(:query)
|
|
298
|
+
self.query = attributes[:query]
|
|
286
299
|
end
|
|
287
300
|
|
|
288
|
-
if attributes.key?(:
|
|
289
|
-
self.
|
|
301
|
+
if attributes.key?(:relevancy_strictness)
|
|
302
|
+
self.relevancy_strictness = attributes[:relevancy_strictness]
|
|
290
303
|
end
|
|
291
304
|
|
|
292
|
-
if attributes.key?(:
|
|
293
|
-
if (value = attributes[:
|
|
294
|
-
self.
|
|
305
|
+
if attributes.key?(:query_languages)
|
|
306
|
+
if (value = attributes[:query_languages]).is_a?(Array)
|
|
307
|
+
self.query_languages = value
|
|
295
308
|
end
|
|
296
309
|
end
|
|
297
310
|
|
|
298
|
-
if attributes.key?(:
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
if attributes.key?(:enable_re_ranking)
|
|
303
|
-
self.enable_re_ranking = attributes[:enable_re_ranking]
|
|
311
|
+
if attributes.key?(:rule_contexts)
|
|
312
|
+
if (value = attributes[:rule_contexts]).is_a?(Array)
|
|
313
|
+
self.rule_contexts = value
|
|
314
|
+
end
|
|
304
315
|
end
|
|
305
316
|
|
|
306
|
-
if attributes.key?(:
|
|
307
|
-
|
|
308
|
-
self.injected_items = value
|
|
309
|
-
end
|
|
317
|
+
if attributes.key?(:user_token)
|
|
318
|
+
self.user_token = attributes[:user_token]
|
|
310
319
|
end
|
|
311
320
|
end
|
|
312
321
|
|
|
@@ -315,34 +324,35 @@ module Algolia
|
|
|
315
324
|
def ==(other)
|
|
316
325
|
return true if self.equal?(other)
|
|
317
326
|
self.class == other.class &&
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
page == other.page &&
|
|
321
|
-
get_ranking_info == other.get_ranking_info &&
|
|
322
|
-
relevancy_strictness == other.relevancy_strictness &&
|
|
323
|
-
facet_filters == other.facet_filters &&
|
|
324
|
-
facets == other.facets &&
|
|
325
|
-
optional_filters == other.optional_filters &&
|
|
326
|
-
numeric_filters == other.numeric_filters &&
|
|
327
|
-
hits_per_page == other.hits_per_page &&
|
|
327
|
+
analytics == other.analytics &&
|
|
328
|
+
analytics_tags == other.analytics_tags &&
|
|
328
329
|
around_lat_lng == other.around_lat_lng &&
|
|
329
330
|
around_lat_lng_via_ip == other.around_lat_lng_via_ip &&
|
|
330
331
|
around_radius == other.around_radius &&
|
|
331
332
|
around_precision == other.around_precision &&
|
|
332
|
-
|
|
333
|
+
click_analytics == other.click_analytics &&
|
|
334
|
+
enable_ab_test == other.enable_ab_test &&
|
|
335
|
+
enable_personalization == other.enable_personalization &&
|
|
336
|
+
enable_re_ranking == other.enable_re_ranking &&
|
|
337
|
+
enable_rules == other.enable_rules &&
|
|
338
|
+
facet_filters == other.facet_filters &&
|
|
339
|
+
facets == other.facets &&
|
|
340
|
+
filters == other.filters &&
|
|
341
|
+
get_ranking_info == other.get_ranking_info &&
|
|
342
|
+
hits_per_page == other.hits_per_page &&
|
|
343
|
+
injected_items == other.injected_items &&
|
|
333
344
|
inside_bounding_box == other.inside_bounding_box &&
|
|
334
345
|
inside_polygon == other.inside_polygon &&
|
|
335
|
-
|
|
346
|
+
minimum_around_radius == other.minimum_around_radius &&
|
|
336
347
|
natural_languages == other.natural_languages &&
|
|
337
|
-
|
|
348
|
+
numeric_filters == other.numeric_filters &&
|
|
349
|
+
optional_filters == other.optional_filters &&
|
|
350
|
+
page == other.page &&
|
|
351
|
+
query == other.query &&
|
|
352
|
+
relevancy_strictness == other.relevancy_strictness &&
|
|
353
|
+
query_languages == other.query_languages &&
|
|
338
354
|
rule_contexts == other.rule_contexts &&
|
|
339
|
-
user_token == other.user_token
|
|
340
|
-
click_analytics == other.click_analytics &&
|
|
341
|
-
analytics == other.analytics &&
|
|
342
|
-
analytics_tags == other.analytics_tags &&
|
|
343
|
-
enable_ab_test == other.enable_ab_test &&
|
|
344
|
-
enable_re_ranking == other.enable_re_ranking &&
|
|
345
|
-
injected_items == other.injected_items
|
|
355
|
+
user_token == other.user_token
|
|
346
356
|
end
|
|
347
357
|
|
|
348
358
|
# @see the `==` method
|
|
@@ -355,34 +365,35 @@ module Algolia
|
|
|
355
365
|
# @return [Integer] Hash code
|
|
356
366
|
def hash
|
|
357
367
|
[
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
page,
|
|
361
|
-
get_ranking_info,
|
|
362
|
-
relevancy_strictness,
|
|
363
|
-
facet_filters,
|
|
364
|
-
facets,
|
|
365
|
-
optional_filters,
|
|
366
|
-
numeric_filters,
|
|
367
|
-
hits_per_page,
|
|
368
|
+
analytics,
|
|
369
|
+
analytics_tags,
|
|
368
370
|
around_lat_lng,
|
|
369
371
|
around_lat_lng_via_ip,
|
|
370
372
|
around_radius,
|
|
371
373
|
around_precision,
|
|
372
|
-
|
|
374
|
+
click_analytics,
|
|
375
|
+
enable_ab_test,
|
|
376
|
+
enable_personalization,
|
|
377
|
+
enable_re_ranking,
|
|
378
|
+
enable_rules,
|
|
379
|
+
facet_filters,
|
|
380
|
+
facets,
|
|
381
|
+
filters,
|
|
382
|
+
get_ranking_info,
|
|
383
|
+
hits_per_page,
|
|
384
|
+
injected_items,
|
|
373
385
|
inside_bounding_box,
|
|
374
386
|
inside_polygon,
|
|
375
|
-
|
|
387
|
+
minimum_around_radius,
|
|
376
388
|
natural_languages,
|
|
377
|
-
|
|
389
|
+
numeric_filters,
|
|
390
|
+
optional_filters,
|
|
391
|
+
page,
|
|
392
|
+
query,
|
|
393
|
+
relevancy_strictness,
|
|
394
|
+
query_languages,
|
|
378
395
|
rule_contexts,
|
|
379
|
-
user_token
|
|
380
|
-
click_analytics,
|
|
381
|
-
analytics,
|
|
382
|
-
analytics_tags,
|
|
383
|
-
enable_ab_test,
|
|
384
|
-
enable_re_ranking,
|
|
385
|
-
injected_items
|
|
396
|
+
user_token
|
|
386
397
|
].hash
|
|
387
398
|
end
|
|
388
399
|
|
|
@@ -9,15 +9,17 @@ module Algolia
|
|
|
9
9
|
module Ingestion
|
|
10
10
|
class RunReasonCode
|
|
11
11
|
INTERNAL = "internal".freeze
|
|
12
|
+
CANCELLED = "cancelled".freeze
|
|
12
13
|
CRITICAL = "critical".freeze
|
|
13
14
|
NO_EVENTS = "no_events".freeze
|
|
14
15
|
TOO_MANY_ERRORS = "too_many_errors".freeze
|
|
16
|
+
LACKING_EVENTS = "lacking_events".freeze
|
|
15
17
|
OK = "ok".freeze
|
|
16
|
-
DISCARDED = "discarded".freeze
|
|
17
18
|
BLOCKING = "blocking".freeze
|
|
19
|
+
IDLE = "idle".freeze
|
|
18
20
|
|
|
19
21
|
def self.all_vars
|
|
20
|
-
@all_vars ||= [INTERNAL, CRITICAL, NO_EVENTS, TOO_MANY_ERRORS, OK,
|
|
22
|
+
@all_vars ||= [INTERNAL, CANCELLED, CRITICAL, NO_EVENTS, TOO_MANY_ERRORS, LACKING_EVENTS, OK, BLOCKING, IDLE].freeze
|
|
21
23
|
end
|
|
22
24
|
|
|
23
25
|
# Builds the enum from string
|
|
@@ -10,12 +10,11 @@ module Algolia
|
|
|
10
10
|
class RunStatus
|
|
11
11
|
CREATED = "created".freeze
|
|
12
12
|
STARTED = "started".freeze
|
|
13
|
-
IDLED = "idled".freeze
|
|
14
13
|
FINISHED = "finished".freeze
|
|
15
14
|
SKIPPED = "skipped".freeze
|
|
16
15
|
|
|
17
16
|
def self.all_vars
|
|
18
|
-
@all_vars ||= [CREATED, STARTED,
|
|
17
|
+
@all_vars ||= [CREATED, STARTED, FINISHED, SKIPPED].freeze
|
|
19
18
|
end
|
|
20
19
|
|
|
21
20
|
# Builds the enum from string
|
|
@@ -24,6 +24,9 @@ module Algolia
|
|
|
24
24
|
# Predicate to filter out specific products when indexing. For more information, see [Query Predicate](https://docs.commercetools.com/api/predicates/query).
|
|
25
25
|
attr_accessor :product_query_predicate
|
|
26
26
|
|
|
27
|
+
# When set to true, the connector indexes objects with all images attributes instead of only the URLs.
|
|
28
|
+
attr_accessor :use_images_objects
|
|
29
|
+
|
|
27
30
|
attr_accessor :custom_fields
|
|
28
31
|
|
|
29
32
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -35,6 +38,7 @@ module Algolia
|
|
|
35
38
|
:project_key => :projectKey,
|
|
36
39
|
:fallback_is_in_stock_value => :fallbackIsInStockValue,
|
|
37
40
|
:product_query_predicate => :productQueryPredicate,
|
|
41
|
+
:use_images_objects => :useImagesObjects,
|
|
38
42
|
:custom_fields => :customFields
|
|
39
43
|
}
|
|
40
44
|
end
|
|
@@ -55,6 +59,7 @@ module Algolia
|
|
|
55
59
|
:project_key => :"String",
|
|
56
60
|
:fallback_is_in_stock_value => :"Boolean",
|
|
57
61
|
:product_query_predicate => :"String",
|
|
62
|
+
:use_images_objects => :"Boolean",
|
|
58
63
|
:custom_fields => :"CommercetoolsCustomFields"
|
|
59
64
|
}
|
|
60
65
|
end
|
|
@@ -121,6 +126,10 @@ module Algolia
|
|
|
121
126
|
self.product_query_predicate = attributes[:product_query_predicate]
|
|
122
127
|
end
|
|
123
128
|
|
|
129
|
+
if attributes.key?(:use_images_objects)
|
|
130
|
+
self.use_images_objects = attributes[:use_images_objects]
|
|
131
|
+
end
|
|
132
|
+
|
|
124
133
|
if attributes.key?(:custom_fields)
|
|
125
134
|
self.custom_fields = attributes[:custom_fields]
|
|
126
135
|
end
|
|
@@ -137,6 +146,7 @@ module Algolia
|
|
|
137
146
|
project_key == other.project_key &&
|
|
138
147
|
fallback_is_in_stock_value == other.fallback_is_in_stock_value &&
|
|
139
148
|
product_query_predicate == other.product_query_predicate &&
|
|
149
|
+
use_images_objects == other.use_images_objects &&
|
|
140
150
|
custom_fields == other.custom_fields
|
|
141
151
|
end
|
|
142
152
|
|
|
@@ -149,7 +159,16 @@ module Algolia
|
|
|
149
159
|
# Calculates hash code according to all attributes.
|
|
150
160
|
# @return [Integer] Hash code
|
|
151
161
|
def hash
|
|
152
|
-
[
|
|
162
|
+
[
|
|
163
|
+
store_keys,
|
|
164
|
+
locales,
|
|
165
|
+
url,
|
|
166
|
+
project_key,
|
|
167
|
+
fallback_is_in_stock_value,
|
|
168
|
+
product_query_predicate,
|
|
169
|
+
use_images_objects,
|
|
170
|
+
custom_fields
|
|
171
|
+
].hash
|
|
153
172
|
end
|
|
154
173
|
|
|
155
174
|
# Builds the object from hash
|
|
@@ -22,6 +22,9 @@ module Algolia
|
|
|
22
22
|
# Predicate to filter out specific products when indexing. For more information, see [Query Predicate](https://docs.commercetools.com/api/predicates/query).
|
|
23
23
|
attr_accessor :product_query_predicate
|
|
24
24
|
|
|
25
|
+
# When set to true, the connector indexes objects with all images attributes instead of only the URLs.
|
|
26
|
+
attr_accessor :use_images_objects
|
|
27
|
+
|
|
25
28
|
attr_accessor :custom_fields
|
|
26
29
|
|
|
27
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -32,6 +35,7 @@ module Algolia
|
|
|
32
35
|
:url => :url,
|
|
33
36
|
:fallback_is_in_stock_value => :fallbackIsInStockValue,
|
|
34
37
|
:product_query_predicate => :productQueryPredicate,
|
|
38
|
+
:use_images_objects => :useImagesObjects,
|
|
35
39
|
:custom_fields => :customFields
|
|
36
40
|
}
|
|
37
41
|
end
|
|
@@ -44,6 +48,7 @@ module Algolia
|
|
|
44
48
|
:url => :"String",
|
|
45
49
|
:fallback_is_in_stock_value => :"Boolean",
|
|
46
50
|
:product_query_predicate => :"String",
|
|
51
|
+
:use_images_objects => :"Boolean",
|
|
47
52
|
:custom_fields => :"CommercetoolsCustomFields"
|
|
48
53
|
}
|
|
49
54
|
end
|
|
@@ -102,6 +107,10 @@ module Algolia
|
|
|
102
107
|
self.product_query_predicate = attributes[:product_query_predicate]
|
|
103
108
|
end
|
|
104
109
|
|
|
110
|
+
if attributes.key?(:use_images_objects)
|
|
111
|
+
self.use_images_objects = attributes[:use_images_objects]
|
|
112
|
+
end
|
|
113
|
+
|
|
105
114
|
if attributes.key?(:custom_fields)
|
|
106
115
|
self.custom_fields = attributes[:custom_fields]
|
|
107
116
|
end
|
|
@@ -117,6 +126,7 @@ module Algolia
|
|
|
117
126
|
url == other.url &&
|
|
118
127
|
fallback_is_in_stock_value == other.fallback_is_in_stock_value &&
|
|
119
128
|
product_query_predicate == other.product_query_predicate &&
|
|
129
|
+
use_images_objects == other.use_images_objects &&
|
|
120
130
|
custom_fields == other.custom_fields
|
|
121
131
|
end
|
|
122
132
|
|
|
@@ -129,7 +139,15 @@ module Algolia
|
|
|
129
139
|
# Calculates hash code according to all attributes.
|
|
130
140
|
# @return [Integer] Hash code
|
|
131
141
|
def hash
|
|
132
|
-
[
|
|
142
|
+
[
|
|
143
|
+
store_keys,
|
|
144
|
+
locales,
|
|
145
|
+
url,
|
|
146
|
+
fallback_is_in_stock_value,
|
|
147
|
+
product_query_predicate,
|
|
148
|
+
use_images_objects,
|
|
149
|
+
custom_fields
|
|
150
|
+
].hash
|
|
133
151
|
end
|
|
134
152
|
|
|
135
153
|
# Builds the object from hash
|
|
@@ -26,6 +26,10 @@ module Algolia
|
|
|
26
26
|
# Time periods when the rule is active.
|
|
27
27
|
attr_accessor :validity
|
|
28
28
|
|
|
29
|
+
attr_accessor :tags
|
|
30
|
+
|
|
31
|
+
attr_accessor :scope
|
|
32
|
+
|
|
29
33
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
30
34
|
def self.attribute_map
|
|
31
35
|
{
|
|
@@ -34,7 +38,9 @@ module Algolia
|
|
|
34
38
|
:consequence => :consequence,
|
|
35
39
|
:description => :description,
|
|
36
40
|
:enabled => :enabled,
|
|
37
|
-
:validity => :validity
|
|
41
|
+
:validity => :validity,
|
|
42
|
+
:tags => :tags,
|
|
43
|
+
:scope => :scope
|
|
38
44
|
}
|
|
39
45
|
end
|
|
40
46
|
|
|
@@ -46,7 +52,9 @@ module Algolia
|
|
|
46
52
|
:consequence => :"Consequence",
|
|
47
53
|
:description => :"String",
|
|
48
54
|
:enabled => :"Boolean",
|
|
49
|
-
:validity => :"Array<TimeRange>"
|
|
55
|
+
:validity => :"Array<TimeRange>",
|
|
56
|
+
:tags => :"Array<String>",
|
|
57
|
+
:scope => :"String"
|
|
50
58
|
}
|
|
51
59
|
end
|
|
52
60
|
|
|
@@ -108,6 +116,16 @@ module Algolia
|
|
|
108
116
|
self.validity = value
|
|
109
117
|
end
|
|
110
118
|
end
|
|
119
|
+
|
|
120
|
+
if attributes.key?(:tags)
|
|
121
|
+
if (value = attributes[:tags]).is_a?(Array)
|
|
122
|
+
self.tags = value
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if attributes.key?(:scope)
|
|
127
|
+
self.scope = attributes[:scope]
|
|
128
|
+
end
|
|
111
129
|
end
|
|
112
130
|
|
|
113
131
|
# Checks equality by comparing each attribute.
|
|
@@ -120,7 +138,9 @@ module Algolia
|
|
|
120
138
|
consequence == other.consequence &&
|
|
121
139
|
description == other.description &&
|
|
122
140
|
enabled == other.enabled &&
|
|
123
|
-
validity == other.validity
|
|
141
|
+
validity == other.validity &&
|
|
142
|
+
tags == other.tags &&
|
|
143
|
+
scope == other.scope
|
|
124
144
|
end
|
|
125
145
|
|
|
126
146
|
# @see the `==` method
|
|
@@ -132,7 +152,7 @@ module Algolia
|
|
|
132
152
|
# Calculates hash code according to all attributes.
|
|
133
153
|
# @return [Integer] Hash code
|
|
134
154
|
def hash
|
|
135
|
-
[algolia_object_id, conditions, consequence, description, enabled, validity].hash
|
|
155
|
+
[algolia_object_id, conditions, consequence, description, enabled, validity, tags, scope].hash
|
|
136
156
|
end
|
|
137
157
|
|
|
138
158
|
# Builds the object from hash
|
data/lib/algolia/version.rb
CHANGED