Skip to content

Commit

Permalink
Improve FunctionScore 'toJson'
Browse files Browse the repository at this point in the history
  • Loading branch information
drmarjanovic committed Jun 24, 2023
1 parent 0e92273 commit c31704c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -321,11 +321,11 @@ private[elasticsearch] final case class FunctionScore[S](
Chunk(
Some("functions" -> Arr(functionScoreFunctions.map(_.toJson))),
boost.map("boost" -> _.toJson),
boostMode.map(bm => "boost_mode" -> bm.toString.toLowerCase.toJson),
boostMode.map("boost_mode" -> _.toString.toLowerCase.toJson),
maxBoost.map("max_boost" -> _.toJson),
minScore.map("min_score" -> _.toJson),
query.map(q => "query" -> q.toJson(None)),
scoreMode.map(sm => "score_mode" -> sm.toString.toLowerCase.toJson)
query.map("query" -> _.toJson(None)),
scoreMode.map("score_mode" -> _.toString.toLowerCase.toJson)
).flatten
)
)
Expand Down

0 comments on commit c31704c

Please sign in to comment.