Hi, Atlassian Community.
Our addon should search pages and blogs in Confluence and our use cases are:
1. Search pages and blogs (by labels, by spaces as AND, OR) for specific user with applying permission checks.
2. We should be compatible Confluence 6.0.1 - 8.0.+
3. We need to find all pages without permission checks for our AO-migration.
Before Confluence 8.0.0 we used these classes,

but Confluence 8.0.0 EAP shows some breaking changes in java API for searching:
1. Class com.atlassian.confluence.search.v2.ContentSearch was changed and old constructors were removed (we used them).
Was

Confluence 8.0.0-m23

2. Class com.atlassian.confluence.search.v2.searchfilter.SiteSearchPermissionsSearchFilter was deprecated and marked as @Internal. We used this class for permission checks.
There are com.atlassian.confluence.search.service.PredefinedSearchBuilder and com.atlassian.confluence.search.service.SearchQueryParameters in the docs, but they have some problems:
1. PredefinedSearchBuilder applies permission checks. It doesn't use permission checks only for admins (it can be found in the source code). How can we guarantee that all pages will be found during our AO-migration? Is it possible to do it without using ugly tricks?
2. SearchQueryParameters can't search by labels. I don't know why. Did somebody try to do it? I couldn't find any page even with one label.
So, how to be compatible with Confluence 6.0.1 - 8.0.+ ? I think there are many apps with the same problem. Any advice would be appreciated.
Kind regards