java Confluence 8.0插件,searchFilter已弃用/删除

0yycz8jy  于 2023-04-04  发布在  Java
关注(0)|答案(1)|浏览(92)

使用Confluence 8.0版本:

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

已经被删除,文档说:

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

现在创建searchQuery / searchFilter的正确方法是什么?
当前(已弃用)代码:

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);

如何使用Confluence 8.0 API实现这一点?
编辑:我们正在开发一个插件和相应的8.0类从文档SiteSearchPermissionsSearchFilter,SiteSearchPermissionsQuery被标记为内部(不用于插件使用)

bhmjp9jg

bhmjp9jg1#

我认为,以下是Atlassian工作人员提供的最佳答案:https://community.developer.atlassian.com/t/broken-java-api-in-confluence-8-eap-contentsearch-getbyid-etc/62907/8
摘要:SearchFilter替换为SearchQuerySiteSearchPermissionsSearchFilter替换为SiteSearchPermissionsQuery

相关问题