Wrong pagination results since uprade to v7.2.1

cancel
Showing results for 
Search instead for 
Did you mean: 
tovski
Member II

Wrong pagination results since uprade to v7.2.1

Hello everyone,

We've came across a pagination problem since we've upgrade Alfresco to v7.2.1.

I'm using the Search API with this body:

{
  "query": {
    "language": "cmis",
    "query": "select * from cmis:document where in_folder('fc896c39-b13b-493a-bdeb-9152d8495dd0')"
  },
  "fields": ["id"],
  "paging": {
    "maxItems": 1,
    "skipCount": 0
  }
}

 

I have 3 files in this directory and the pagination results are wrong, here is the response : 

{  
"list": {
"pagination": {
"count": 1,
"hasMoreItems": true,
"totalItems": 2,
"skipCount": 0,
"maxItems": 1 }, "entries": [
{ "entry": {
"id": "7149284e-7422-4f55-b16e-63a8cd61fa76" } } ] } }

 The fields totalItems says 2 but i have 3 files.

Does somebody ever came across this behavior ?

Thanks.

6 Replies
sanjaybandhniya
Intermediate

Re: Wrong pagination results since uprade to v7.2.1

Could you check same query in alfresco node browser and check result?

Thanks & Regards,
Sanjay
tovski
Member II

Re: Wrong pagination results since uprade to v7.2.1

Thank you for your reply.

I tried the cmis request on the node explorer and the results and pagination seems correct (3 results).

But the problem i have is with the pagination infos, the number of items are correct bu not the pagination info (totalItems).

It happens when i set the field "maxItems" to 1 and "skipCount" to 0 (i want only one file in the response but with pagination info).

The cmis query i'm using is mainly for retrieving the number of files in a directory, that's why i want only one file, because i'm only interested in the pagination results to have the field totalItems.

I've also tried the API /nodes/{nodeId}/children, the pagination info is correct, so is it a problem with the search api ?

 

tovski
Member II

Re: Wrong pagination results since uprade to v7.2.1

I'm still looking for help.

robinp
Partner

Re: Wrong pagination results since uprade to v7.2.1

Why not using a lucene/AFTS query with PARENT:"yourparentnode" ??

robinp
Partner

Re: Wrong pagination results since uprade to v7.2.1

Also, maybe is it possible that your third node is not a cmis:document ?

tovski
Member II

Re: Wrong pagination results since uprade to v7.2.1

Hi, thanks for your reply.

We can't use AFTS because our project is developed around CMIS. But i can try just for debugging

Yes my third node is a cmis:document