0

With Confluence Version 8.0 the:

import com.atlassian.confluence.search.v2.searchfilter.SiteSearchPermissionsSearchFilter;

has been removed and the docs say:

com.atlassian.confluence.search.v2.searchfilter (use the equivalent class that extends SearchQuery in 8.0)

Which is now the right way to create a searchQuery / searchFilter?

Current (Deprecated) Code:

import com.atlassian.confluence.search.v2.query.BooleanQuery;
import com.atlassian.confluence.search.v2.searchfilter.SiteSearchPermissionsSearchFilter;

....

ContentSearch search = new ContentSearch(BooleanQuery.composeAndQuery(allQueries), RELEVANCE_SORT, SiteSearchPermissionsSearchFilter.getInstance(), 0, 1);

How can this be done with the Confluence 8.0 API?

Edit: We are developing a Plugin and the corresponding 8.0 classes from the docs SiteSearchPermissionsSearchFilter, SiteSearchPermissionsQuery are marked as Internal (not for plugin use)

Gobliins
  • 3,848
  • 16
  • 67
  • 122

1 Answers1

1

I think, here is the best answer provided by a Atlassian staff member: https://community.developer.atlassian.com/t/broken-java-api-in-confluence-8-eap-contentsearch-getbyid-etc/62907/8

Summary: SearchFilter is replaced with SearchQuery and SiteSearchPermissionsSearchFilter by SiteSearchPermissionsQuery.

Krzysztof Bogdan
  • 916
  • 7
  • 16
  • Thx for the answer. Been there already. Problem is, the mentioned classes are marked as Internal and are not for plugin use. – Gobliins Apr 03 '23 at 07:58
  • @Gobliins I did not confirmed it but there is somebody who claims that `@Internal` is not a problem: https://community.developer.atlassian.com/t/broken-java-api-in-confluence-8-eap-contentsearch-getbyid-etc/62907/15?u=krzysztofbogdan1 – Krzysztof Bogdan Apr 03 '23 at 12:40