2

我在对象存储中有超过一百万个文档,我想知道特定时间段内的文档数。如何使用 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
}
4

1 回答 1

1

可以在后台搜索中使用COUNT()函数:

select COUNT(Id) from Document

链接到后台搜索查询的 SQL 语法

通过 API 处理后台搜索查询

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

表架构 - DocVersion

于 2021-08-19T09:44:03.133 回答