You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/algolia/models/recommend/fallback_params.rb
+19-22Lines changed: 19 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,6 @@ class FallbackParams
45
45
# Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.
46
46
attr_accessor:minimum_around_radius
47
47
48
-
# Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).
49
48
attr_accessor:inside_bounding_box
50
49
51
50
# 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`.
@@ -138,6 +137,9 @@ class FallbackParams
138
137
# Attribute that should be used to establish groups of results. Attribute names are case-sensitive. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts.
139
138
attr_accessor:attribute_for_distinct
140
139
140
+
# Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
141
+
attr_accessor:max_facet_hits
142
+
141
143
# Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. Attribute names are case-sensitive. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included.
142
144
attr_accessor:attributes_to_retrieve
143
145
@@ -202,7 +204,6 @@ class FallbackParams
202
204
# Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported.
203
205
attr_accessor:advanced_syntax
204
206
205
-
# Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words divided by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).
206
207
attr_accessor:optional_words
207
208
208
209
# Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). Attribute names are case-sensitive. This can be useful for attributes with long values, where the likelihood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking.
@@ -227,9 +228,6 @@ class FallbackParams
227
228
# Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI.
228
229
attr_accessor:response_fields
229
230
230
-
# Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
231
-
attr_accessor:max_facet_hits
232
-
233
231
# Maximum number of facet values to return for each facet.
# 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
+
moduleAlgolia
7
+
moduleRecommend
8
+
moduleInsideBoundingBox
9
+
class << self
10
+
# List of class defined in oneOf (OpenAPI v3)
11
+
defopenapi_one_of
12
+
[
13
+
:"Array<Array<Float>>",
14
+
:"String"
15
+
]
16
+
end
17
+
18
+
# Builds the object
19
+
# @param [Mixed] Data to be matched against the list of oneOf items
20
+
# @return [Object] Returns the model or the data itself
21
+
defbuild(data)
22
+
# Go through the list of oneOf items and attempt to identify the appropriate one.
23
+
# Note:
24
+
# - We do not attempt to check whether exactly one item matches.
25
+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
26
+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
27
+
# - TODO: scalar values are de facto behaving as if they were nullable.
28
+
# - TODO: logging when debugging is set.
29
+
openapi_one_of.eachdo |klass|
30
+
begin
31
+
# "nullable: true"
32
+
nextifklass == :AnyType
33
+
typed_data=find_and_cast_into_type(klass,data)
34
+
returntyped_dataiftyped_data
35
+
# rescue all errors so we keep iterating even if the current item lookup raises
36
+
rescue
37
+
end
38
+
end
39
+
40
+
openapi_one_of.include?(:AnyType) ? data : nil
41
+
end
42
+
43
+
private
44
+
45
+
SchemaMismatchError=Class.new(StandardError)
46
+
47
+
# Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
# 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
+
moduleAlgolia
7
+
moduleRecommend
8
+
moduleOptionalWords
9
+
class << self
10
+
# List of class defined in oneOf (OpenAPI v3)
11
+
defopenapi_one_of
12
+
[
13
+
:"Array<String>",
14
+
:"String"
15
+
]
16
+
end
17
+
18
+
# Builds the object
19
+
# @param [Mixed] Data to be matched against the list of oneOf items
20
+
# @return [Object] Returns the model or the data itself
21
+
defbuild(data)
22
+
# Go through the list of oneOf items and attempt to identify the appropriate one.
23
+
# Note:
24
+
# - We do not attempt to check whether exactly one item matches.
25
+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
26
+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
27
+
# - TODO: scalar values are de facto behaving as if they were nullable.
28
+
# - TODO: logging when debugging is set.
29
+
openapi_one_of.eachdo |klass|
30
+
begin
31
+
# "nullable: true"
32
+
nextifklass == :AnyType
33
+
typed_data=find_and_cast_into_type(klass,data)
34
+
returntyped_dataiftyped_data
35
+
# rescue all errors so we keep iterating even if the current item lookup raises
36
+
rescue
37
+
end
38
+
end
39
+
40
+
openapi_one_of.include?(:AnyType) ? data : nil
41
+
end
42
+
43
+
private
44
+
45
+
SchemaMismatchError=Class.new(StandardError)
46
+
47
+
# Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
0 commit comments