File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Sources/AlgoliaSearchClient/Models/Search/Response/SearchResponse Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ extension SearchResponse: Codable {
2929 case automaticRadius
3030 case serverUsed
3131 case indexUsed
32+ case abTestID
3233 case abTestVariantID
3334 case parsedQuery
3435 case facetsStorage = " facets "
@@ -67,6 +68,7 @@ extension SearchResponse: Codable {
6768 self . automaticRadius = legacyAutomaticRadius. flatMap ( Double . init)
6869 self . serverUsed = try container. decodeIfPresent ( forKey: . serverUsed)
6970 self . indexUsed = try container. decodeIfPresent ( forKey: . indexUsed)
71+ self . abTestID = try container. decodeIfPresent ( forKey: . abTestID)
7072 self . abTestVariantID = try container. decodeIfPresent ( forKey: . abTestVariantID)
7173 self . parsedQuery = try container. decodeIfPresent ( forKey: . parsedQuery)
7274 self . facetsStorage = try container. decodeIfPresent ( forKey: . facetsStorage)
@@ -105,6 +107,7 @@ extension SearchResponse: Codable {
105107 try container. encodeIfPresent ( legacyAutomaticRadius, forKey: . automaticRadius)
106108 try container. encodeIfPresent ( serverUsed, forKey: . serverUsed)
107109 try container. encodeIfPresent ( indexUsed, forKey: . indexUsed)
110+ try container. encodeIfPresent ( abTestID, forKey: . abTestID)
108111 try container. encodeIfPresent ( abTestVariantID, forKey: . abTestVariantID)
109112 try container. encodeIfPresent ( parsedQuery, forKey: . parsedQuery)
110113 try container. encodeIfPresent ( facetsStorage, forKey: . facetsStorage)
Original file line number Diff line number Diff line change @@ -119,6 +119,12 @@ public struct SearchResponse {
119119 - Returned only if Query.getRankingInfo is set to true.
120120 */
121121 public var indexUsed : IndexName ?
122+
123+ /**
124+ In case of A/B test, reports the ID of the A/B test used.
125+ - Returned only if [Query.getRankingInfo] is set to true.
126+ */
127+ public var abTestID : ABTestID ?
122128
123129 /**
124130 In case of A/B test, reports the variant ID used. The variant ID is the position in the array of variants
You can’t perform that action at this time.
0 commit comments