From b0a8b1b51a4f4c710f087bdf6acd969fb43a5053 Mon Sep 17 00:00:00 2001 From: Ignasi Marimon-Clos Date: Mon, 9 Apr 2018 12:10:04 +0200 Subject: [PATCH] Fix ES JSON mapping (#72) --- .../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 {