【问题标题】:How to get the count of documents for the object store using FileNet API's如何使用 FileNet API 获取对象存储的文档计数
【发布时间】:2021-08-19 06:00:57
【问题描述】:

我在对象存储中有超过一百万个文档,我想知道特定时间段内的文档数。如何使用 FileNet CE api 获取计数

我使用的代码如下,最多只能提供 200 个文档。

--Code
SearchScope scope= new SearchScope(obj);
SearchSQL sql= new SearchSQL();
sql.setMaxRecords(100000);
String query="select * from document where datecreated >(date)";
RepositoryRowSet res= scope.fetchRows(sql,1000,null,null);
int count=0;
PageIterator p= result.pageIterator();
while(p.nextPage){
count+=p.getElementCount();a
}

【问题讨论】:

标签: filenet-p8 filenet-content-engine filenet-cpe


【解决方案1】:

background searches中可以使用COUNT()函数:

select COUNT(Id) from Document

Link to SQL syntax for background search query

Working with background search queries via API

或者,您可以使用直接数据库连接并使用 DocVersion 表中记录的数据库表架构查找文档数。

Table schema - DocVersion

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-01-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-04-12
    相关资源
    最近更新 更多