Liferay 7.2 Search performance - double checking permissions

Daniel Karwowski, modified 5 Years ago. New Member Posts: 2 Join Date: 7/14/20 Recent Posts
I have a portal with thousands of articles and I noticed problems with search performance for loading last pages. I've investigated the problem by logging search queries and in logs, I see that search is performing a lot of queries in batches. I found that the reason for that is double permission checking, first one by applying elasticsearch query filters and the second one by performing a permission checker on every article retrieved from elasticsearch. I've tried to play with DefaultSearchResultPermissionFilterConfiguration but I end up with no performance improvement.Is it possible to disable / fix sliding window search, and keep only permission checking on a query without this sliding window search?
Or maybe You have an idea how to correctly set up a sliding window correctly to not fetch all data from the index.