Skip to content

Commit

Permalink
#37 Fix query on numeric value
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Nov 20, 2017
1 parent 411d86c commit 1b2af9e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/org/elastic4play/services/QueryDSL.scala
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ object QueryDSL {
implicit class SearchField(field: String) extends BuildableTermsQueryImplicits {
private def convertValue(value: Any): Any = value match {
case _: Enumeration#Value value.toString
case bd: BigDecimal bd.toDouble
case _ value
}
def ~=(value: Any) = QueryDef(nestedField(field, termQuery(_, convertValue(value))))
Expand Down

0 comments on commit 1b2af9e

Please sign in to comment.