I need to perform a pagination query with distinct values. But when I enable returnDistinctValues and set resultOffSet and resultRecordCount, the query would fail with error messages
The query parameters are
There is nothing in the Feature Service REST API documentation that says you can't use distinct when doing pagination query.
So is it possible to do pagination query on distinct results? Am I doing something wrong?
Solved! Go to Solution.
I had a friend putting a inquire request to ESRI and this is the response
We have one instance of this inquiry having had happened with Esri Inc many years ago.
The developers and product managers noted that pagination is not supported with outStatistics or returnDistinctValues on feature layers. The thoughts are that when making this kind of query, with its specificity, it should not need to return 1000s of records, requiring pagination - that number of records would not return any meaningful information. outStatistics and returnDisctingValues are meant to be used only on a handful of records, not 1000s.
We don't have any specific recommendation for you to suggest avenues to work around this design.
What would likely need to happen is that the data would need to be manipulated at the database level, through specific SQL queries or data manipulation, prior to it being published as a service. In this way, the query either would not require distinct values, or would not require pagination.
I guess we won't get a function anytime soon
Under Layer (Feature Service) documentation I did find a capability parameter called supportsPaginationOnAggregatedQueries. I do not see that in the capability list in my Feature service I published and I don't see that checkbox option in the server manager either.
Is that a new feature?
How do I enable it?
What version of ArcGIS Enterprise/Server do I need to be in to have that parameter option?
I had a friend putting a inquire request to ESRI and this is the response
We have one instance of this inquiry having had happened with Esri Inc many years ago.
The developers and product managers noted that pagination is not supported with outStatistics or returnDistinctValues on feature layers. The thoughts are that when making this kind of query, with its specificity, it should not need to return 1000s of records, requiring pagination - that number of records would not return any meaningful information. outStatistics and returnDisctingValues are meant to be used only on a handful of records, not 1000s.
We don't have any specific recommendation for you to suggest avenues to work around this design.
What would likely need to happen is that the data would need to be manipulated at the database level, through specific SQL queries or data manipulation, prior to it being published as a service. In this way, the query either would not require distinct values, or would not require pagination.
I guess we won't get a function anytime soon