Hi,
I am trying to use cmis queries to implement pagination in my php script. However I'm facing strange behaviors from Alfresco results sets.
When I run the following query:
{
"query":{
"query":"select * from adb:sampledoc where IN_TREE('46518183-593c-481f-b30e-4a42baeb07ff') ORDER BY cmis:creationDate DESC",
"language":"cmis"
}
}
I get the following result set:
{
"list": {
"pagination": {
"count": 0,
"hasMoreItems": false,
"totalItems": 0,
"skipCount": 0,
"maxItems": 100
},
"entries": []
}
}
which contains totalItems, that I need for pagination.
However, when I run the following query:
{
"query":{
"query":"select * from adb:sampledoc where IN_FOLDER('bb5715ed-38b1-4b01-839a-6064dfd10f82') ORDER BY cmis:creationDate DESC",
"language":"cmis"
}
}
I get the following result set:
{
"list": {
"pagination": {
"count": 100,
"hasMoreItems": true,
"skipCount": 0,
"maxItems": 100
},
"entries": [...]
}
}
As you see, the totalItems is missing. Does anybody know if this is a bug or I'm doing something wrong
Even stranger is that, we have alfresco on other systems. running the query with IN_FOLDER gives totalItems back.
Any help is appreciated.
Thanks
Hi:
IN_TREE is not supported in CMIS queries solved by database (transactional metadata queries), so maybe your differences between your systems is how they configure the search subsystem (if your query is solved by database when possible or if it is always sent to SOLR). I can not confirm it but I would say that SOLR should give you totalItems.
Regards.
--C.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.