File tree Expand file tree Collapse file tree 4 files changed +11
-1
lines changed
Sources/AlgoliaSearchClient/Models/Settings
Tests/AlgoliaSearchClientTests Expand file tree Collapse file tree 4 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ extension Settings {
4343 case keepDiacriticsOnCharacters
4444 case queryLanguages
4545 case enableRules
46+ case enablePersonalization
4647 case queryType
4748 case removeWordsIfNoResults
4849 case advancedSyntax
Original file line number Diff line number Diff line change @@ -227,6 +227,13 @@ public struct Settings: Codable {
227227 - [Documentation](https://www.algolia.com/doc/api-reference/api-parameters/enableRules/?language=swift)
228228 */
229229 public var enableRules : Bool ?
230+
231+ /**
232+ Enable the Personalization feature.
233+ - Engine default: false
234+ - [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/enablePersonalization/?language=swift]
235+ */
236+ public var enablePersonalization : Bool ?
230237
231238 /**
232239 Controls if and how query words are interpreted as [prefixes][https://www.algolia.com/doc/guides/textual-relevance/prefix-search/?language=swift).
Original file line number Diff line number Diff line change 1818 "paginationLimitedTo" : 1000 ,
1919 "attributeForDistinct" : null ,
2020 "exactOnSingleWordQuery" : " attribute" ,
21+ "enablePersonalization" : true ,
2122 "ranking" : [
2223 " typo" ,
2324 " geo" ,
Original file line number Diff line number Diff line change @@ -17,13 +17,14 @@ class SettingsTests: XCTestCase {
1717 settings. sortFacetsBy = . count
1818 settings. attributesToHighlight = [ " attr2 " , " attr3 " ]
1919 settings. attributeCriteriaComputedByMinProximity = false
20-
20+ settings . enablePersonalization = true
2121 }
2222
2323 func testDecoding( ) throws {
2424 let data = try Data ( filename: " Settings.json " )
2525 let decoder = JSONDecoder ( )
2626 let settings = try decoder. decode ( Settings . self, from: data)
2727 XCTAssertEqual ( settings. attributeCriteriaComputedByMinProximity, false )
28+ XCTAssertEqual ( settings. enablePersonalization, true )
2829 }
2930}
You can’t perform that action at this time.
0 commit comments