File tree Expand file tree Collapse file tree 4 files changed +12
-3
lines changed
commonMain/kotlin/com/algolia/search
commonTest/kotlin/serialize Expand file tree Collapse file tree 4 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -455,5 +455,10 @@ public data class Query(
455455 * Engine default: true
456456 * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/percentileComputation/?language=kotlin]
457457 */
458- @SerialName(KeyPercentileComputation ) var percentileComputation : Boolean? = null
458+ @SerialName(KeyPercentileComputation ) var percentileComputation : Boolean? = null ,
459+ /* *
460+ * Overrides the query parameter and performs a more generic search that can be used to find "similar" results.
461+ * [Documentation][https://www.algolia.com/doc/api-reference/api-parameters/similarQuery/?language=kotlin]
462+ */
463+ @SerialName(KeySimilarQuery ) var similarQuery : String? = null
459464)
Original file line number Diff line number Diff line change @@ -358,4 +358,5 @@ public const val KeyDistrict = "district"
358358public const val KeyDegradedQuery = " degradedQuery"
359359public const val KeyGeoPoint = " geoPoint"
360360public const val KeySuburb = " suburb"
361- public const val KeyVillage = " village"
361+ public const val KeyVillage = " village"
362+ public const val KeySimilarQuery = " similarQuery"
Original file line number Diff line number Diff line change @@ -351,5 +351,6 @@ internal class TestKeys {
351351 KeyDegradedQuery shouldEqual " degradedQuery"
352352 KeyGeoPoint shouldEqual " geoPoint"
353353 KeyVillage shouldEqual " village"
354+ KeySimilarQuery shouldEqual " similarQuery"
354355 }
355356}
Original file line number Diff line number Diff line change @@ -86,7 +86,8 @@ internal class TestQuery : TestSerializer<Query>(Query.serializer()) {
8686 minProximity = int,
8787 responseFields = listOf (ResponseFields .NbHits ),
8888 maxFacetHits = int,
89- percentileComputation = boolean
89+ percentileComputation = boolean,
90+ similarQuery = string
9091 ) to json {
9192 KeyQuery to string
9293 KeyAttributesToRetrieve to attributesJson
@@ -153,6 +154,7 @@ internal class TestQuery : TestSerializer<Query>(Query.serializer()) {
153154 KeyResponseFields to jsonArray { + ResponseFields .NbHits .raw }
154155 KeyMaxFacetHits to int
155156 KeyPercentileComputation to boolean
157+ KeySimilarQuery to string
156158 }
157159 )
158160
You can’t perform that action at this time.
0 commit comments