使用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被标记为内部(不用于插件使用)
1条答案
按热度按时间bhmjp9jg1#
我认为,以下是Atlassian工作人员提供的最佳答案:https://community.developer.atlassian.com/t/broken-java-api-in-confluence-8-eap-contentsearch-getbyid-etc/62907/8
摘要:
SearchFilter
替换为SearchQuery
,SiteSearchPermissionsSearchFilter
替换为SiteSearchPermissionsQuery
。