I am trying to use the elastic search module in the playback structure to search for books, and I have the following method for doing a search in the controller, which returns me a list of books based on the search string entered by the user
public static void bookList(String search){
SearchResults<Book> searchResult = ElasticSearch.search(QueryBuilders.queryString(search) , Book.class);
List<Book> bookList = searchResult.objects ;
render(bookList);
}
Now I need to paginate the results. How do I do this using the Java API?
source
share