Commit ad1c00e4 authored by Radheshhathwar's avatar Radheshhathwar
Browse files

Page wise search implementation

Showing with 2 additions and 1 deletion
+2 -1
......@@ -340,9 +340,10 @@ public class SearchServiceImpl implements SearchService {
SearchResponse searchResponse;
String keyValue = searchRequest.getSort().keySet().iterator().next();
keyValue = getKeyValue(keyValue);
int from = searchRequest.getPage() > 0 ? (searchRequest.getPage() * searchRequest.getSize()) : 0;
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder()
.query(createTicketSearchQuery(searchRequest))
.from(searchRequest.getPage())
.from(from)
.size(searchRequest.getSize())
.sort(keyValue, SortOrder.valueOf(searchRequest.getSort().get(searchRequest.getSort().keySet().iterator().next()).toUpperCase()));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment