-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mismatch between @iot.count and @iot.nextLink when using $expand #146
Comments
I can reproduce this bug on 0.5 and latest, I probably introduced this bug somewhere when changing the queries. Working on it.. |
Returning too few results per page when using $expand should be fixed with commit 9fc9764 In the above mentioned commit there was also a fix for a sometimes incorrect result for the request $count=true. The @iot.count field contains the total count of (main requested) entities which suit the request/query, according to the standard: "The $count system query option with a value of true specifies that the total count of items within a collection matching the request SHALL be returned along with the result" |
Thanks! Rolled out http://test.smartemission.nl/gost/v1.0/Things?$expand=Locations,Datastreams&$count=true This will indeed return all about 190 More complex queries like the last Can imagine such queries are complex to implement and that the STA standard is not always clear. For cross-issue-ref: |
About the 2nd request: Some time ago when we worked on 9.3.3.5 and example request 4 as test, we changed the left joins to inner joins for expands to return the correct response. I think you don't get all expected Things because some Datastreams don't hold any Observations, is this correct? I checked and found out we interpreted some things wrong, some scenarios with their expected return:
Going to work on this now. |
The different scenario's now give the expected result: 11ca2c7 |
Ok, tried 11ca2c7 on SE testserver. Problem we are facing is that there are nearly 6 million |
Found on v0.5 Docker version. See also smartemission/smartemission#79 (comment) and further comments there.
We have 182
Things
in our GOST STA server. When requesting these directly or with expanding onlyLocations
we get 100Things
with first request and 82 using thenextLink
in the first response. e.g.But when we also or only expand
Datastreams
only 13Things
are returned (eachThing
has about 8 Datastreams so 13*8 amounts for about 100) and thenextLink
returns again 13Things
but without anextLink
, so it looks we fetched allThings
.nextLink
)Explicitly increasing
$skip
with 100 will eventually return allThings
with some overlap:.
.
According to the standard The count annotation represents the number of entities in the collection. : http://docs.opengeospatial.org/is/15-078r6/15-078r6.html#37. So maybe
@iot.count
should be the total number of Entities, includingLocations
andDatastreams
? But just the count ofThings
(182) seems to make more sense.The text was updated successfully, but these errors were encountered: