I have more than a million documents in object store, and I want to know the count of documents for a specific time period. How can I get the count using FileNet CE api's
The code I use is below, which gives me only a maximum of 200 documents.
--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
}
It is possible to use
COUNT()
function in background searches:Link to SQL syntax for background search query
Working with background search queries via API
Or, you can use a direct database connection and find the count of documents using documented database tables schema from DocVersion table.
Table schema - DocVersion