<?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 Re: Wrong pagination results since uprade to v7.2.1 in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/wrong-pagination-results-since-uprade-to-v7-2-1/m-p/147364#M38997</link>
    <description>&lt;P&gt;Hi, thanks for your reply.&lt;/P&gt;&lt;P&gt;We can't use AFTS because our project is developed around CMIS. But i can try just for debugging&lt;/P&gt;&lt;P&gt;Yes my third node is a cmis:document&lt;/P&gt;</description>
    <pubDate>Wed, 24 May 2023 15:59:48 GMT</pubDate>
    <dc:creator>tovski</dc:creator>
    <dc:date>2023-05-24T15:59:48Z</dc:date>
    <item>
      <title>Wrong pagination results since uprade to v7.2.1</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/wrong-pagination-results-since-uprade-to-v7-2-1/m-p/147358#M38991</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;We've came across a pagination problem since we've upgrade Alfresco to &lt;STRONG&gt;v7.2.1&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I'm using the &lt;STRONG&gt;Search API&lt;/STRONG&gt; with this body:&lt;/P&gt;&lt;PRE&gt;{
  "query": {
    "language": "cmis",
    "query": "select * from cmis:document where in_folder('fc896c39-b13b-493a-bdeb-9152d8495dd0')"
  },
  "fields": ["id"],
  "paging": {
    "maxItems": 1,
    "skipCount": 0
  }
}&lt;/PRE&gt;&lt;P&gt;I have 3 files in this directory and the pagination results are wrong, here is the response :&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;  &lt;BR /&gt;&lt;SPAN class=""&gt;    "list"&lt;/SPAN&gt;&lt;SPAN&gt;: {&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;        "pagination"&lt;/SPAN&gt;&lt;SPAN&gt;: {&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;            "count"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;            "hasMoreItems"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;            "totalItems"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;            "skipCount"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;            "maxItems"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;
        },
        &lt;SPAN class=""&gt;"entries"&lt;/SPAN&gt;&lt;SPAN&gt;: [&lt;BR /&gt;&lt;/SPAN&gt;        {
            &lt;SPAN class=""&gt;"entry"&lt;/SPAN&gt;&lt;SPAN&gt;: {&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;                "id"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"7149284e-7422-4f55-b16e-63a8cd61fa76"&lt;/SPAN&gt;
            }
        }
     ]
   }
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;The fields &lt;STRONG&gt;totalItems&lt;/STRONG&gt; says &lt;STRONG&gt;2&lt;/STRONG&gt; but i have &lt;STRONG&gt;3&lt;/STRONG&gt; files.&lt;BR /&gt;&lt;BR /&gt;Does somebody ever came across this behavior ?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 09:59:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/wrong-pagination-results-since-uprade-to-v7-2-1/m-p/147358#M38991</guid>
      <dc:creator>tovski</dc:creator>
      <dc:date>2023-04-28T09:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong pagination results since uprade to v7.2.1</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/wrong-pagination-results-since-uprade-to-v7-2-1/m-p/147359#M38992</link>
      <description>&lt;P&gt;Could you check same query in alfresco node browser and check result?&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 04:07:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/wrong-pagination-results-since-uprade-to-v7-2-1/m-p/147359#M38992</guid>
      <dc:creator>sp2</dc:creator>
      <dc:date>2023-05-01T04:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong pagination results since uprade to v7.2.1</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/wrong-pagination-results-since-uprade-to-v7-2-1/m-p/147360#M38993</link>
      <description>&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;I tried the cmis request on the node explorer and the results and pagination seems correct (3 results).&lt;/P&gt;&lt;P&gt;But the problem i have is with the pagination infos, the number of items are correct bu not the pagination info (totalItems).&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;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 &lt;STRONG&gt;totalItems&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I've also tried the API&amp;nbsp;/&lt;STRONG&gt;nodes/{nodeId}/children&lt;/STRONG&gt;, the pagination info is correct, so is it a problem with the search api ?&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 07:40:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/wrong-pagination-results-since-uprade-to-v7-2-1/m-p/147360#M38993</guid>
      <dc:creator>tovski</dc:creator>
      <dc:date>2023-05-02T07:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong pagination results since uprade to v7.2.1</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/wrong-pagination-results-since-uprade-to-v7-2-1/m-p/147361#M38994</link>
      <description>&lt;P&gt;I'm still looking for help.&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 08:20:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/wrong-pagination-results-since-uprade-to-v7-2-1/m-p/147361#M38994</guid>
      <dc:creator>tovski</dc:creator>
      <dc:date>2023-05-24T08:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong pagination results since uprade to v7.2.1</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/wrong-pagination-results-since-uprade-to-v7-2-1/m-p/147362#M38995</link>
      <description>&lt;P&gt;Why not using a lucene/AFTS query with PARENT:"yourparentnode" ??&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 10:22:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/wrong-pagination-results-since-uprade-to-v7-2-1/m-p/147362#M38995</guid>
      <dc:creator>robinp</dc:creator>
      <dc:date>2023-05-24T10:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong pagination results since uprade to v7.2.1</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/wrong-pagination-results-since-uprade-to-v7-2-1/m-p/147363#M38996</link>
      <description>&lt;P&gt;Also, maybe is it possible that your third node is not a cmis:document ?&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 10:23:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/wrong-pagination-results-since-uprade-to-v7-2-1/m-p/147363#M38996</guid>
      <dc:creator>robinp</dc:creator>
      <dc:date>2023-05-24T10:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong pagination results since uprade to v7.2.1</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/wrong-pagination-results-since-uprade-to-v7-2-1/m-p/147364#M38997</link>
      <description>&lt;P&gt;Hi, thanks for your reply.&lt;/P&gt;&lt;P&gt;We can't use AFTS because our project is developed around CMIS. But i can try just for debugging&lt;/P&gt;&lt;P&gt;Yes my third node is a cmis:document&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 15:59:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/wrong-pagination-results-since-uprade-to-v7-2-1/m-p/147364#M38997</guid>
      <dc:creator>tovski</dc:creator>
      <dc:date>2023-05-24T15:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong pagination results since uprade to v7.2.1</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/wrong-pagination-results-since-uprade-to-v7-2-1/m-p/147365#M38998</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you found any solution ? Like overriding the SearchApiWebscript.class maybe ?&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2023 09:11:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/wrong-pagination-results-since-uprade-to-v7-2-1/m-p/147365#M38998</guid>
      <dc:creator>alecorff</dc:creator>
      <dc:date>2023-06-30T09:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong pagination results since uprade to v7.2.1</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/wrong-pagination-results-since-uprade-to-v7-2-1/m-p/147366#M38999</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm still looking for a solution.&lt;/P&gt;&lt;P&gt;I don't know where i can find the file&amp;nbsp;&lt;SPAN&gt;SearchApiWebscript.class and unfortunately i don't have many options regarding the configuration of alfresco because it is managed by a business client.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I would like to know if it is bug of the&amp;nbsp;v7.2.1 or if we did something wrong while upgrading from the previous version (aflresco v6).&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2023 13:34:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/wrong-pagination-results-since-uprade-to-v7-2-1/m-p/147366#M38999</guid>
      <dc:creator>tovski</dc:creator>
      <dc:date>2023-07-07T13:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong pagination results since uprade to v7.2.1</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/wrong-pagination-results-since-uprade-to-v7-2-1/m-p/147367#M39000</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I think it's a bug from v7.2.1 as I reproduce the issue in business client environment.&lt;/P&gt;&lt;P&gt;I duplicate the search api webscript and create a new CustomSearchApiWebscript.java where I only add a line to calculate the right totalItems. As far as I test, it seems to work.&lt;/P&gt;&lt;P&gt;I now need to call&amp;nbsp;https://&amp;lt;serverName&amp;gt;/alfresco/s/customSearchApiWS&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2023 13:51:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/wrong-pagination-results-since-uprade-to-v7-2-1/m-p/147367#M39000</guid>
      <dc:creator>alecorff</dc:creator>
      <dc:date>2023-07-07T13:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong pagination results since uprade to v7.2.1</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/wrong-pagination-results-since-uprade-to-v7-2-1/m-p/147368#M39001</link>
      <description>&lt;P&gt;Thanks for your reply,&lt;/P&gt;&lt;P&gt;I did some digging and i found a bug report on jira&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;A href="https://alfresco.atlassian.net/browse/MNT-22988?focusedCommentId=1120337" target="_self" rel="nofollow noopener noreferrer"&gt;https://alfresco.atlassian.net/browse/MNT-22988?focusedCommentId=1120337&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;see also for more explanation :&amp;nbsp;&lt;A href="https://alfresco.atlassian.net/browse/MNT-22385?focusedCommentId=1087195" target="_self" rel="nofollow noopener noreferrer"&gt;https://alfresco.atlassian.net/browse/MNT-22385?focusedCommentId=1087195&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seams that "&lt;SPAN&gt;this is not a bug"... but an expected behavour related to permissions check.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The "solution" i found is to use &lt;STRONG&gt;IN_TREE&lt;/STRONG&gt; in replacement of &lt;STRONG&gt;IN_FOLDER&amp;nbsp;&lt;/STRONG&gt;to force the query to be executed on SOLR.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;EDIT: I found an other solution, it's possible to increase the max permissions check number in the query body with the property "limits".&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;    "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
    }&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Jul 2023 14:40:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/wrong-pagination-results-since-uprade-to-v7-2-1/m-p/147368#M39001</guid>
      <dc:creator>tovski</dc:creator>
      <dc:date>2023-07-07T14:40:07Z</dc:date>
    </item>
  </channel>
</rss>

