Skip to content

Commit d6df342

Browse files
committed
feat(search): add appliedRules as part of the ResponseSearch
1 parent 8b3f5f4 commit d6df342

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/commonMain/kotlin/com/algolia/search/model/response/ResponseSearch.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import com.algolia.search.serialize.JsonNonStrict
2121
import com.algolia.search.serialize.KSerializerFacetMap
2222
import com.algolia.search.serialize.KSerializerPoint
2323
import com.algolia.search.serialize.KeyAbTestVariantID
24+
import com.algolia.search.serialize.KeyAppliedRules
2425
import com.algolia.search.serialize.KeyAroundLatLng
2526
import com.algolia.search.serialize.KeyAutomaticRadius
2627
import com.algolia.search.serialize.KeyCursor
@@ -211,7 +212,8 @@ public data class ResponseSearch(
211212
/**
212213
* Meta-information as to how the query was processed.
213214
*/
214-
@SerialName(KeyExplain) val explainOrNull: Explain? = null
215+
@SerialName(KeyExplain) val explainOrNull: Explain? = null,
216+
@SerialName(KeyAppliedRules) val appliedRulesOrNull: List<JsonObject>? = null
215217
) {
216218

217219
public val hits: List<Hit>
@@ -304,6 +306,9 @@ public data class ResponseSearch(
304306
public val explain: Explain
305307
get() = explainOrNull!!
306308

309+
public val appliedRules: List<JsonObject>
310+
get() = appliedRulesOrNull!!
311+
307312
@Deprecated(
308313
message = "Use getObjectPosition instead.",
309314
replaceWith = ReplaceWith("getObjectPosition(objectID)"),

src/commonMain/kotlin/com/algolia/search/serialize/KeysTwo.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,4 @@ public const val KeyUser_Token = "user_token"
198198
public const val KeyPersonalization = "personalization"
199199
public const val KeyRankingScore = "rankingScore"
200200
public const val KeyFiltersScore = "filtersScore"
201+
public const val KeyAppliedRules = "appliedRules"

0 commit comments

Comments
 (0)