How should i proper page queries in IBM FileNet?

2.9k views Asked by At

Are there any methods to page queries in FileNet? I have a grid control with paging so i need to get count of elements total in query and possibility to get in example page 3 of results(with any page size). I found only TOP operator, but are there any SKIP or COUNT?

2

There are 2 answers

3
ᄂ ᄀ On BEST ANSWER

There is no way to accomplish exactly what you want. The main reason for this is that it is very expensive for Content Engine to count all rows returned by a query (assuming there are thousands of them). There can be quite involved security restrictions that potentially have to be applied to each returned object. This will effectively exclude some objects from query results, affecting the result count. Evaluating effective security permissions on multiple objects would kill the performance, thus avoided. That is why you don't have COUNT or other aggregate functions in the query language.

If you can restrict the amount of records displayed in the grid to a reasonable number, then COUNT_LIMIT might work for you — see Query Options and getTotalCount(). However, this will require looping through to the required page with its inherent performance drawback.

10
Robert vd S On

Here is a good link with a backend example on how the paging works:

Paging example

as for the totals count, this should be in the pageiterator object: pageIterator api page

In this case you'd need to manually keep track of the paging in the UI

or as an alternative, install, configure and implement CMIS to perform the operations, that has page skipping as default functionalty

CMIS infocenter