From 8b2fddeba2a405dd5ba2d84ea4b03592ab8d2e91 Mon Sep 17 00:00:00 2001 From: Ignasi Marimon-Clos Date: Tue, 3 Apr 2018 12:46:58 +0200 Subject: [PATCH] Fix ES JSON mapping --- .../scala/com/example/elasticsearch/request/Query.scala | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/search-impl/src/main/scala/com/example/elasticsearch/request/Query.scala b/search-impl/src/main/scala/com/example/elasticsearch/request/Query.scala index eb5dafe..9985eec 100644 --- a/search-impl/src/main/scala/com/example/elasticsearch/request/Query.scala +++ b/search-impl/src/main/scala/com/example/elasticsearch/request/Query.scala @@ -7,11 +7,14 @@ case class BooleanQuery(must_not: Filter, must: Seq[Filter]) case class Query(bool: BooleanQuery) -case class QueryRoot(pageNumber: Int, - pageSize: Int, +case class QueryRoot(from: Int, + size: Int, query: Query, sort: Seq[SortField] = Seq(Sorters.auctionEndDescending(), Sorters.priceAscending()) - ) + ) { + val pageNumber: Int = from + val pageSize: Int = size +} object BooleanQuery {