<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic not getting totalItems when running cmis query in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/not-getting-totalitems-when-running-cmis-query/m-p/72685#M23524</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to use cmis queries to implement pagination in my php script. However I'm facing strange behaviors from Alfresco results sets.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the following query:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt; "query":{&lt;/P&gt;&lt;P&gt;"query":"select * from adb:sampledoc where IN_TREE('46518183-593c-481f-b30e-4a42baeb07ff') ORDER BY cmis:creationDate DESC",&lt;BR /&gt; "language":"cmis"&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the following result set:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt; "list": {&lt;BR /&gt; "pagination": {&lt;BR /&gt; "count": 0,&lt;BR /&gt; "hasMoreItems": false,&lt;BR /&gt; "totalItems": 0,&lt;BR /&gt; "skipCount": 0,&lt;BR /&gt; "maxItems": 100&lt;BR /&gt; },&lt;BR /&gt; "entries": []&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which contains totalItems, that I need for pagination.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I run the following query:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt; "query":{&lt;/P&gt;&lt;P&gt;"query":"select * from&amp;nbsp;&lt;SPAN&gt;adb:&lt;/SPAN&gt;&lt;SPAN&gt;sampledoc&lt;/SPAN&gt; where IN_FOLDER('bb5715ed-38b1-4b01-839a-6064dfd10f82') ORDER BY cmis:creationDate DESC",&lt;BR /&gt; "language":"cmis"&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the following result set:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt; "list": {&lt;BR /&gt; "pagination": {&lt;BR /&gt; "count": 100,&lt;BR /&gt; "hasMoreItems": true,&lt;BR /&gt; "skipCount": 0,&lt;BR /&gt; "maxItems": 100&lt;BR /&gt; },&lt;BR /&gt; "entries": [...]&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you see, the totalItems is missing. Does anybody know if this is a bug or I'm doing something wrong&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even stranger is that, we have alfresco on other systems. running the query with IN_FOLDER gives totalItems back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Mar 2018 09:20:53 GMT</pubDate>
    <dc:creator>archiver</dc:creator>
    <dc:date>2018-03-22T09:20:53Z</dc:date>
    <item>
      <title>not getting totalItems when running cmis query</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/not-getting-totalitems-when-running-cmis-query/m-p/72685#M23524</link>
      <description>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</description>
      <pubDate>Thu, 22 Mar 2018 09:20:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/not-getting-totalitems-when-running-cmis-query/m-p/72685#M23524</guid>
      <dc:creator>archiver</dc:creator>
      <dc:date>2018-03-22T09:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: not getting totalItems when running cmis query</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/not-getting-totalitems-when-running-cmis-query/m-p/72686#M23525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;IN_TREE is&lt;/SPAN&gt;&amp;nbsp;not supported in CMIS queries solved by database (transactional metadata queries), so maybe your differences between your systems&amp;nbsp;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;--C.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2018 15:47:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/not-getting-totalitems-when-running-cmis-query/m-p/72686#M23525</guid>
      <dc:creator>cesarista</dc:creator>
      <dc:date>2018-03-22T15:47:27Z</dc:date>
    </item>
  </channel>
</rss>

