Adobe-Consulting-Services / acs-aem-commons

http://adobe-consulting-services.github.io/acs-aem-commons/
Apache License 2.0
453 stars 600 forks source link

Searching of the redirect rules are not working in pagination | Redirect Manager #3192

Open anandsharma04 opened 1 year ago

anandsharma04 commented 1 year ago

Required Information

Expected Behavior

Whenever we add a lot of redirect rules, then it creates the pagination of the list. When we search any rules then it should search and fetch the result from the entire list irrespective of the information is even present on the 2nd or 3rd page of pagination. Search should always run on entire list.

Actual Behavior

Search is only running on the current page in list of redirect rules. Search doesn't fetch the result from the next page in pagination. We have to visit each pages of pagination and then search on each page of pagination which should not be the case.

Steps to Reproduce

1) Open redirect manager. 2) Add few rules, so that pagination will get generated. 3) Search any rules which is available in next page. 4) It will show nothing in the result.

Links

https://adobe-consulting-services.github.io/acs-aem-commons/features/redirect-manager/index.html Links to related assets, e.g. content packages containing test components

YegorKozlov commented 1 year ago

This is by design. Search is client-side and only works on the current page. How many redirects do you have? The current page size is 1000 and in the current impl it is hardcoded. In theory, we can make it configurable, so if search is important, you can increase the page size to a larger value .

anandsharma04 commented 1 year ago

Hi @YegorKozlov Thanks for checking this. We have more than 5000 rules present in the redirect manager. It would be great if you modify the existing functionality to search on all the paginations.

anandsharma04 commented 11 months ago

Hi Team,

Can you please fix this?

Regards, Anand Sharma

YegorKozlov commented 11 months ago

@anandsharma04 this is a community project and patches are welcome.

Like I explained above, the current impl searches client-side, on the current page only. Try reducing the number of redirects by capturing regex . I bet many of your 5K redirects can be grouped into regexes. You can also export the rules into a spreadsheet and search in it, update the data and import back.

anandsharma04 commented 11 months ago

Hi @YegorKozlov Thanks for the update. Exporting 5k rules, updating spreadsheet and again importing the excel requires manual effort which will be error-prone.