Sometimes you want to order by price and see whats the lowest price of this product. What you get now is 1€-30€ products wich includes your requested product, but its hidden behind some cheap 1€ products wich you dont care for. The 1€ product is just garbage to show the product ordered on top of your search result and the real cheap offer is hidden behind it.
Since you also want a working pagination, there will be some problems with performance. If you request 10, you can not really know how many results with multiple products there will be. So you will have to crawl a bigger amount of products as your size param.
Use case
Sometimes you want to order by price and see whats the lowest price of this product. What you get now is 1€-30€ products wich includes your requested product, but its hidden behind some cheap 1€ products wich you dont care for. The 1€ product is just garbage to show the product ordered on top of your search result and the real cheap offer is hidden behind it.
Requirements
Example requests
/api/search?s=example&multi=false
/api/search?s=example&multi=false&order=lowest
/api/search?s=example&multi=false&size=10&page=2
Possible problems
Since you also want a working pagination, there will be some problems with performance. If you request 10, you can not really know how many results with multiple products there will be. So you will have to crawl a bigger amount of products as your
size
param.