04-28-2023 05:59 AM
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.
07-07-2023 10:40 AM
Thanks for your reply,
I did some digging and i found a bug report on jira
https://alfresco.atlassian.net/browse/MNT-22988?focusedCommentId=1120337
see also for more explanation : https://alfresco.atlassian.net/browse/MNT-22385?focusedCommentId=1087195
It seams that "this is not a bug"... but an expected behavour related to permissions check.
The "solution" i found is to use IN_TREE in replacement of IN_FOLDER to force the query to be executed on SOLR.
EDIT: I found an other solution, it's possible to increase the max permissions check number in the query body with the property "limits".
"query": { "query": "SELECT * FROM cmis:document WHERE IN_FOLDER('fc896c39-b13b-493a-bdeb-9152d8495dd0')", "language": "cmis" }, "fields": [ "id" ], "paging": { "maxItems": 1, "skipCount": 0 }, "limits": { "permissionEvaluationCount": 10000 }
07-07-2023 10:40 AM
Thanks for your reply,
I did some digging and i found a bug report on jira
https://alfresco.atlassian.net/browse/MNT-22988?focusedCommentId=1120337
see also for more explanation : https://alfresco.atlassian.net/browse/MNT-22385?focusedCommentId=1087195
It seams that "this is not a bug"... but an expected behavour related to permissions check.
The "solution" i found is to use IN_TREE in replacement of IN_FOLDER to force the query to be executed on SOLR.
EDIT: I found an other solution, it's possible to increase the max permissions check number in the query body with the property "limits".
"query": { "query": "SELECT * FROM cmis:document WHERE IN_FOLDER('fc896c39-b13b-493a-bdeb-9152d8495dd0')", "language": "cmis" }, "fields": [ "id" ], "paging": { "maxItems": 1, "skipCount": 0 }, "limits": { "permissionEvaluationCount": 10000 }
Explore our Alfresco products with the links below. Use labels to filter content by product module.