-
Notifications
You must be signed in to change notification settings - Fork 265
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
Pagination not working properly? #1647
Comments
This behaviour is due to Context Provider (CPr) forwarding. Note that in the case of "santander:device" all the information is local to CB, while in the case of "bikerting", there is no local information and all is retrieved from a CPr.
Mixing pagination with CPr has some problems which solution is not clear (have a look to the "root" issue on pagination with CPr: #847). As you can see, currently there are two ideas on the table (any other suggestion? ;) but it is not clear which one to adopt at the end (both involve extra cost). |
Thanks. So, how can I retrieve data associated with such a query? Is there some sort of workaround? E.g., can I retrieve details about the CPr and access it directly? Moreover, a subscription that I registered for bikerenting doesn't seem to be working either. Is it because of the same issue? |
The workaround is to use the same queries, but assuming that the pagination parameters will be ignored. Actually, the second query you mentions works ok (returning 22 entities, at the moment of writting this). Regarding subscripitions, CB doesn't know when informatino change in CPr (and pooling them for changes is not efficient). Thus, by the moment onchange subscriptions work only with entities that are local to the CB. |
Based on this, as issue #847 was closed by PR #4149 we are going to close this issue. If we are wrong and it is still not working, please tell us about it (with the detailed steps to reproduce the problem), please. |
I am experiencing a strange behavior of Orion in FIWARE Lab. Between two queries with the only difference being the entity type ("santander:device" versus "bikerenting"), one is working properly, and the other is ignoring "limit" (probably also "offset") and returning "Count: 0" in details. The queries are:
echo '{"entities": [{"type":"santander:device","isPattern":"true","id": ".*"}],"attributes":[]}' | curl -X POST orion.lab.fiware.org:1026/v1/queryContext?limit=1&offset=0&details=on -s -S
--header 'Content-Type: application/json' --header 'Accept: application/json' --header "X-Auth-Token: $AUTH_TOKEN" -d @- | python -mjson.tool
echo '{"entities": [{"type":"bikerenting","isPattern":"true","id": ".*"}],"attributes":[]}' | curl -X POST orion.lab.fiware.org:1026/v1/queryContext?limit=1&offset=0&details=on -s -S
--header 'Content-Type: application/json' --header 'Accept: application/json' --header "X-Auth-Token: $AUTH_TOKEN" -d @- | python -mjson.tool
Here are the version details:
$ curl -X GET orion.lab.fiware.org:1026/version -s -S --header "X-Auth-Token: $AUTH_TOKEN"
The text was updated successfully, but these errors were encountered: