diff --git a/elastic4s-core/src/test/scala/com/sksamuel/elastic4s/requests/searches/queries/RankFeatureQueryBodyFnTest.scala b/elastic4s-core/src/test/scala/com/sksamuel/elastic4s/requests/searches/queries/RankFeatureQueryBodyFnTest.scala index 0dccbe6e1..9774ce6a5 100644 --- a/elastic4s-core/src/test/scala/com/sksamuel/elastic4s/requests/searches/queries/RankFeatureQueryBodyFnTest.scala +++ b/elastic4s-core/src/test/scala/com/sksamuel/elastic4s/requests/searches/queries/RankFeatureQueryBodyFnTest.scala @@ -25,7 +25,7 @@ class RankFeatureQueryBodyFnTest extends AnyFunSuite with Matchers with GivenWhe | "field": "pagerank", | "boost": 0.5, | "sigmoid": { - | "pivot": 7, + | "pivot": 7.0, | "exponent": 0.6 | } | } @@ -50,7 +50,7 @@ class RankFeatureQueryBodyFnTest extends AnyFunSuite with Matchers with GivenWhe | "rank_feature":{ | "field": "pagerank", | "log": { - | "scaling_factor": 3 + | "scaling_factor": 3.0 | } | } |} @@ -75,7 +75,7 @@ class RankFeatureQueryBodyFnTest extends AnyFunSuite with Matchers with GivenWhe | "rank_feature":{ | "field": "pagerank", | "saturation": { - | "pivot": 2 + | "pivot": 2.0 | } | } |} diff --git a/elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/queries/RankFeatureQuery.scala b/elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/queries/RankFeatureQuery.scala index 5fd1988c3..ffbb184b1 100644 --- a/elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/queries/RankFeatureQuery.scala +++ b/elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/queries/RankFeatureQuery.scala @@ -26,8 +26,8 @@ case class RankFeatureQuery(field: String, } object RankFeatureQuery { - case class Saturation(pivot: Option[Int]) - case class Log(scalingFactor: Int) - case class Sigmoid(pivot: Int, exponent: Double) + case class Saturation(pivot: Option[Float]) + case class Log(scalingFactor: Float) + case class Sigmoid(pivot: Float, exponent: Double) case class Linear() } diff --git a/elastic4s-tests/src/test/resources/json/search/search_rank_feature.json b/elastic4s-tests/src/test/resources/json/search/search_rank_feature.json index a954b0300..2dce7156c 100644 --- a/elastic4s-tests/src/test/resources/json/search/search_rank_feature.json +++ b/elastic4s-tests/src/test/resources/json/search/search_rank_feature.json @@ -5,7 +5,7 @@ "field": "pagerank", "boost": 0.5, "sigmoid": { - "pivot": 7, + "pivot": 7.0, "exponent": 0.6 } }