简体   繁体   中英

Orion Context broker - query

In version 0.23 of Orion context broker.

Can I query the context for entities with a certain value on an attribute? How?

Can I query for entities generated at a certain time range? How?

For geolocation Filter. Is there any limit to the polygon vertices besides request size of 1MG?

thanks

Regarding attribute value filters, have a look to this other Q&A post .

Regarding querying for entities generated at a certain time range, we are planning to include that as the dateModified pseudo-attribute ("pseudo" in the sense that is not an attribute to be managed by the NGSI client, but by Orion itself), so you could do a query like this one to get all the entities modified from January 1st, 2015 to January 12th, 2015:

GET /v2/entities?q=dateModified==2015-01-01..2015-01-12

That functionality is not yet implemented, but as workaround your application could manage an attribute with the same semantics. Eg. you could use an entity attribute named myDate storing the date as a timestamp and do the same query in the following way:

GET /v2/entities?q=myDate==1420070400..1421020800

Note: 2015-01-01 equals to 1420070400 and 2015-01-12 equals to 1421020800, the following page may help: http://www.timestampgenerator.com

Regarding the limits of the polygon areas in geo-queries, we haven't found a limit so far. However, if you test with a large number and find a limit, please tell us about it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM