From the course: Elasticsearch Essential Training
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Sorting and pagination - Elastic Stack Tutorial
From the course: Elasticsearch Essential Training
Sorting and pagination
- [Instructor] Imagine you are shopping online and you wanted to sort the product based on the price or maybe the popularity or maybe the new arrivals. In all those cases, you might want to do the sorting. Sometimes you don't want to see all the items. You wanted to see the first 10 items, then next 10, then next 10. In that case, you probably wanted to do the pagination. All these sorting and pagination is possible in the elastic search. Let's understand how we can do that. For example, if you wanted to find out all the products which is sorted based on the price, you can use the sort, and say that I wanted to do the sorting based on the price, and you can just say descending. So in this case, this will going to sort the product in terms of the pricing, where the price of the highest would be on the top, and the lowest would be at the bottom. In case, if you wanted to do an ascending order, you have to just say ASC, and then you can get it in the ascending order. Maybe possible that…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.