<?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 pagination issue -- resultRecordCount and resultOffset in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/pagination-issue-resultrecordcount-and/m-p/509333#M19802</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I applied a geometry filter in the query to a ArcGIS Server Map Service (query enabled), when the ResultOffset is set to 0 and resultRecordCount is set to 500, it only returns 36 records&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;IMG class="image-1 jive-image" height="514" src="https://community.esri.com/legacyfs/online/484630_pastedImage_1.png" style="border: 0px; font-weight: inherit; margin: 2px 20px 0px;" width="509" /&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;If I remove these parameters in the query, it returns all the features intersects with the geometry:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;IMG class="image-2 jive-image" height="445" src="https://community.esri.com/legacyfs/online/484661_pastedImage_2.png" style="border: 0px; font-weight: inherit; margin: 2px 20px 0px;" width="582" /&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;This only happens to the ArcGIS Server Service, if the service is hosted in the ArcGIS Enterprise Portal, it works OK.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Any idea what's happening?&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Thanks you in advance.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="border: 0px;"&gt;please note that I posted the same question&amp;nbsp;in the ArcGIS REST API Community a couple of days ago, but I am thinking it might also be a ArcGIS Server topic,&amp;nbsp; as this happens on a ArcGIS Server Map/ Feature Service, but it works fine for a hosted service (I know the service is hosted on a federated server...), I am wondering it might have something to do with my ArcGIS Server settings. if it is true.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Mar 2020 05:24:53 GMT</pubDate>
    <dc:creator>simoxu</dc:creator>
    <dc:date>2020-03-10T05:24:53Z</dc:date>
    <item>
      <title>pagination issue -- resultRecordCount and resultOffset</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/pagination-issue-resultrecordcount-and/m-p/509333#M19802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I applied a geometry filter in the query to a ArcGIS Server Map Service (query enabled), when the ResultOffset is set to 0 and resultRecordCount is set to 500, it only returns 36 records&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;IMG class="image-1 jive-image" height="514" src="https://community.esri.com/legacyfs/online/484630_pastedImage_1.png" style="border: 0px; font-weight: inherit; margin: 2px 20px 0px;" width="509" /&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;If I remove these parameters in the query, it returns all the features intersects with the geometry:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;IMG class="image-2 jive-image" height="445" src="https://community.esri.com/legacyfs/online/484661_pastedImage_2.png" style="border: 0px; font-weight: inherit; margin: 2px 20px 0px;" width="582" /&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;This only happens to the ArcGIS Server Service, if the service is hosted in the ArcGIS Enterprise Portal, it works OK.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Any idea what's happening?&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Thanks you in advance.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="border: 0px;"&gt;please note that I posted the same question&amp;nbsp;in the ArcGIS REST API Community a couple of days ago, but I am thinking it might also be a ArcGIS Server topic,&amp;nbsp; as this happens on a ArcGIS Server Map/ Feature Service, but it works fine for a hosted service (I know the service is hosted on a federated server...), I am wondering it might have something to do with my ArcGIS Server settings. if it is true.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2020 05:24:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/pagination-issue-resultrecordcount-and/m-p/509333#M19802</guid>
      <dc:creator>simoxu</dc:creator>
      <dc:date>2020-03-10T05:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: pagination issue -- resultRecordCount and resultOffset</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/pagination-issue-resultrecordcount-and/m-p/509334#M19803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Simo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is expected behavior.&lt;/P&gt;&lt;P&gt;In short, it is due to how spatial filters are handled in ArcGIS Enterprise Map and Feature Services. The long story is complicated, and I don't think I'd be able to explain this very clearly here without making you more confused.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should check for 'exceedTransferLimit' flag. This is what we have in &lt;A href="https://developers.arcgis.com/rest/services-reference/query-map-service-dynamic-layer-.htm"&gt;REST API help&lt;/A&gt;.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;The &lt;SPAN class=""&gt;exceededTransferLimit&lt;/SPAN&gt; property is now included in the JSON response when paging through a query result with the resultOffset and resultRecordCount parameters. When &lt;SPAN class=""&gt;exceededTransferLimit&lt;/SPAN&gt; is &lt;SPAN class=""&gt;true&lt;/SPAN&gt;, it indicates there are more query results and you can continue to page through the results. When &lt;SPAN class=""&gt;exceededTransferLimit&lt;/SPAN&gt; is &lt;SPAN class=""&gt;false&lt;/SPAN&gt;, it indicates that you have reached the end of the query results.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;BR /&gt;Tanu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2020 17:23:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/pagination-issue-resultrecordcount-and/m-p/509334#M19803</guid>
      <dc:creator>TanuHoque</dc:creator>
      <dc:date>2020-03-10T17:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: pagination issue -- resultRecordCount and resultOffset</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/pagination-issue-resultrecordcount-and/m-p/509335#M19804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tanu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answer to the question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this is an expected behavior, I am just curious why the hosted service in AGOL and ArcGIS portal do not have this issue, as we all know behind the scenes, the same ArcGIS server is doing the heavy lifting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More importantly, this expected ArcGIS server behaviour is causing issue in the APIs (at least I have personally experienced the issue in ArcGIS Python API). I dived into the API source code and found, the code checks for the number of records returned, if it is less than the&amp;nbsp;resultRecordCount or the MaxRecordCount (whichever is less) it will assume all the records has been retrieved and stop querying the service.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Simo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2020 00:36:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/pagination-issue-resultrecordcount-and/m-p/509335#M19804</guid>
      <dc:creator>simoxu</dc:creator>
      <dc:date>2020-03-11T00:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: pagination issue -- resultRecordCount and resultOffset</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/pagination-issue-resultrecordcount-and/m-p/509336#M19805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;If this is an expected behavior, I am just curious why the hosted service in AGOL and ArcGIS portal do not have this issue, as we all know behind the scenes, the same ArcGIS server is doing the heavy lifting.&lt;/BLOCKQUOTE&gt;&lt;P&gt;That is because technically 'hosted services' and 'enterprise map and feature services' are two different implementation. There are some age old specifications that need to be honored in enterprise implementation of map and feature service that leads us to this known issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;More importantly, this expected ArcGIS server behaviour is causing issue in the APIs (at least I have personally experienced the issue in ArcGIS Python API). I dived into the API source code and found, the code checks for the number of records returned, if it is less than the&amp;nbsp;resultRecordCount or the MaxRecordCount (whichever is less) it will assume all the records has been retrieved and stop querying the service.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Thanks for noticing this. That seems something that might need to fix in ArcGIS Python API. Would you mind contact Esri Support and have an issue logged in. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Tanu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2020 16:56:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/pagination-issue-resultrecordcount-and/m-p/509336#M19805</guid>
      <dc:creator>TanuHoque</dc:creator>
      <dc:date>2020-03-11T16:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: pagination issue -- resultRecordCount and resultOffset</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/pagination-issue-resultrecordcount-and/m-p/509337#M19806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;I've&amp;nbsp;contacted ESRI local support&amp;nbsp;for this issue to be escalated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2020 22:41:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/pagination-issue-resultrecordcount-and/m-p/509337#M19806</guid>
      <dc:creator>simoxu</dc:creator>
      <dc:date>2020-03-11T22:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: pagination issue -- resultRecordCount and resultOffset</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/pagination-issue-resultrecordcount-and/m-p/1086617#M30844</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/12731"&gt;@simoxu&lt;/a&gt;,&amp;nbsp;was this problem fixed?&amp;nbsp; I seem to be experiencing a similar issue in the ArcGIS API for JavaScript.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Aug 2021 15:01:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/pagination-issue-resultrecordcount-and/m-p/1086617#M30844</guid>
      <dc:creator>AndyWhitaker1</dc:creator>
      <dc:date>2021-08-06T15:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: pagination issue -- resultRecordCount and resultOffset</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/pagination-issue-resultrecordcount-and/m-p/1088341#M30897</link>
      <description>&lt;P&gt;You might find this post helpful.&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/esri-leaflet/issues/786" target="_blank" rel="noopener"&gt;https://github.com/Esri/esri-leaflet/issues/786&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 10:37:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/pagination-issue-resultrecordcount-and/m-p/1088341#M30897</guid>
      <dc:creator>simoxu</dc:creator>
      <dc:date>2021-08-12T10:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: pagination issue -- resultRecordCount and resultOffset</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/pagination-issue-resultrecordcount-and/m-p/1268744#M35411</link>
      <description>&lt;P&gt;This is a really pesky issue.&amp;nbsp; I have confirmed that my spatial query should return 1931 records (confirmed with local data via ArcGIS Pro as well as REST query with returnCountOnly set to true).&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, using a utility function that paginates through results using the exceededTransferLimit flag, I get back 2370 results.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My function submits an initial query which returns 1931 results, but the exceededTransferLimit flag is set to true, so it submits a second time with the resultOffset set to 1931 and gets back 439 features with no exceededTransferLimit key (not even set to false - it's just not included in the response) so my final result set is 2370 records instead of 1931.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The python API only returns 1931, so that seems works, but I have users just using Python requests.&amp;nbsp; Is there something I'm implementing incorrectly?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def paginate_queries(query_url:str, params:object, features:list=[])-&amp;gt;pd.DataFrame:
    if len(features)&amp;gt;0:
        params['resultOffset']=len(features)
    result = requests.post(query_url, params=params).json()
    print(f"{len(result['features'])} features returned")
    newfeatures = features + result['features']
    if ('exceededTransferLimit' in result.keys()) and (result['exceededTransferLimit']):
        return paginate_queries(query_url, params, features=newfeatures)
    return pd.json_normalize(newfeatures)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2023 20:08:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/pagination-issue-resultrecordcount-and/m-p/1268744#M35411</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2023-03-16T20:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: pagination issue -- resultRecordCount and resultOffset</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/pagination-issue-resultrecordcount-and/m-p/1683291#M43779</link>
      <description>&lt;P&gt;Seems that this issue of 'less than the expected number of records' being returned is a known bug:&amp;nbsp;&lt;A href="https://support.esri.com/en-us/bug/in-arcgis-server-if-the-values-for-result-offset-and-re-bug-000120308" target="_blank"&gt;https://support.esri.com/en-us/bug/in-arcgis-server-if-the-values-for-result-offset-and-re-bug-000120308&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I have been paginating data and relying on the 'exceededTransferLimit' flag to know when to request for more. Have found that I need to increment the resultOffset by the resultRecordCount each time to get close to the right result.&lt;/P&gt;&lt;P&gt;The only thing I am still seeing is that when I request a page of data that isn't full (e.g. request 1000 results but due to the known bug only 995 are returned with the flag raised), the subsequent page I request has the last feature from the previous page on it again. Crazy. See the issue here for more info:&lt;/P&gt;&lt;P&gt;&lt;A href="https://gis.stackexchange.com/questions/499944/esri-rest-query-with-spatial-intersect-inconsistent-results" target="_blank"&gt;https://gis.stackexchange.com/questions/499944/esri-rest-query-with-spatial-intersect-inconsistent-results&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Can anyone else reproduce that issue on their feature server?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Feb 2026 07:28:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/pagination-issue-resultrecordcount-and/m-p/1683291#M43779</guid>
      <dc:creator>SteveWealands</dc:creator>
      <dc:date>2026-02-10T07:28:45Z</dc:date>
    </item>
  </channel>
</rss>

