Skip to content

Commit

Permalink
Update perf field to use List instead of Range
Browse files Browse the repository at this point in the history
we cant perform range queries on keywords as mentioned lichess-org/lila#14299 (comment)
  • Loading branch information
Carbrex committed Mar 13, 2024
1 parent c407275 commit 978a19e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/game.scala
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ case class Query(
winner: Option[String] = None,
loser: Option[String] = None,
winnerColor: Option[Int] = None,
perf: Range[Int] = Range.none,
perf: List[Int] = List.empty,
source: Option[Int] = None,
status: Option[Int] = None,
turns: Range[Int] = Range.none,
Expand Down Expand Up @@ -98,7 +98,7 @@ case class Query(
date map Date.formatter.print queries Fields.date,
hasAiQueries,
(hasAi | true).fold(aiLevel queries Fields.ai, Nil),
perf queries Fields.perf,
if (perf.nonEmpty) List(termsQuery(Fields.perf, perf)) else Nil,
toQueries(source, Fields.source),
toQueries(rated, Fields.rated),
toQueries(status, Fields.status),
Expand Down

0 comments on commit 978a19e

Please sign in to comment.