SuluHeadlessBundle icon indicating copy to clipboard operation
SuluHeadlessBundle copied to clipboard

Add configurable limit and pagination to the SearchController

Open alexandersch opened this issue 3 years ago • 2 comments

Having the limit configureable and make it possible to have a page parameter like it is in the smart content would be great for the search controller. This is just a reminder for anyone that wants to implement this if not by myself.

alexandersch avatar Mar 31 '21 06:03 alexandersch

Thanks for reporting! I think this would be useful too (maybe even in the WebsiteSearchController of the sulu/sulu package).

I think it should be relatively easy to implement this as the SearchManager of the massive/search-bundle already supports pagination. As a workaround, you can overwrite the SearchController service in your project at the moment.

niklasnatter avatar Apr 02 '21 13:04 niklasnatter

Not sure if the limit should be a query parameter. Atleast there should be a max_limit (default: 100) configuration so the api does not allow to load everything because loading all could produce a high load average on server.

alexander-schranz avatar Apr 22 '21 10:04 alexander-schranz