koopjs / koop-provider-marklogic

A Koop Provider that can be used to exposed data in MarkLogic via Esri feature services
https://koopjs.github.io/koop-provider-marklogic/
Other
6 stars 11 forks source link

Set the limitExceeded metadata field in the response #22

Closed jkerr5 closed 1 year ago

jkerr5 commented 6 years ago

See https://github.com/koopjs/FeatureServer#featureserverroute It looks like limitExceeded should be set to true if there are more features available than what were returned.

It's unclear what behavior this enables at the koop level though.

jkerr5 commented 6 years ago

@jmamanpara This thread has some good info: https://community.esri.com/thread/67749 as does https://developers.arcgis.com/rest/services-reference/query-related-records-feature-service-.htm

The exceededTransferLimit property is now included in the JSON response when paging through a query result with the resultOffset and resultRecordCount parameters. When exceededTransferLimit is true, it indicates there are more query results, and you can continue to page through the results. When exceededTransferLimit is false, it indicates that you have reached the end of the query results.

It looks like https://github.com/koopjs/FeatureServer/blob/master/src/templates.js#L73 sets the exceededTransferLimit property to true if we set limitExceeded to true.

So, we should set limitExceeded if there are more results than what are returned.

This can be done by increasing the limit by one in the query and checking if we get that number back but actually only return up to the limit.

rjrudin commented 1 year ago

Addressed via #71