条件为Georgel表达式的Fiware orion订阅
我的orion DB中有一个实体:条件为Georgel表达式的Fiware orion订阅,fiware,fiware-orion,Fiware,Fiware Orion,我的orion DB中有一个实体: { "id"=>"User-121", "type"=>"User", "location"=>{ "type"=>"geo:point", "value"=>"59.851484, 30.199463" }, "time"=>{"type"=>"none", "value"=>222909, "metadata"=>{}} } 另外,我对该实体有3个订阅,它们在条
{
"id"=>"User-121",
"type"=>"User",
"location"=>{
"type"=>"geo:point",
"value"=>"59.851484, 30.199463"
},
"time"=>{"type"=>"none", "value"=>222909, "metadata"=>{}}
}
另外,我对该实体有3个订阅,它们在条件表达式中具有相同的坐标:
Orion上下文代理版本为0.28.0(git版本:5c1afdb3dd748580f10e1809f82462d83d2a17d4)NGSIv2订阅中的地理位置功能尚未实现(Orion 0.28.0)。请注意,NGSIv2仍处于测试状态,有时(其中
几何体
、几何体
和坐标
被定义为表达式
的一部分)是实现的一个步骤
关于这一点,您可以订阅它,以便了解此功能何时实现
编辑:NGSIv2订阅中的地理位置功能将在Orion 1.3.0中提供(将于8月底或9月初发布)。如果您不想等待,请注意开发分支(以及相关的Docker)中也提供了该功能。我认为还有一个问题与此相关。当我尝试在创建后立即搜索实体时,一切都正常。我使用与订阅中存在的过滤条件相同的过滤条件。(例如:“几何学”=>“点”,“坐标”=>“59.851484,30.199463”,“乔治”=>“近;思维距离:100”)。但在我更新实体后,搜索停止工作,即使坐标保持不变。我在我自己的服务器和服务上尝试了这一点。请编辑您的问题帖子,将您正在使用的Orion Context Broker版本包括在内,好吗?我的意思是,用
contextBroker--version
打印的那个。谢谢完成。感谢您的反馈!请也复习一下。编辑答案以包含关于Orion功能的更新。
{
"id"=>"...",
"expires"=>"...",
"status"=>"active",
"subject"=>{
"entities"=>[{"id"=>"User-121", "idPattern"=>"", "type"=>"User"}],
"condition"=>{
"attributes"=>["location", "time"],
"expression"=>{
"q"=>"",
"geometry"=>"point",
"coords"=>"59.851484, 30.199463",
"georel"=>"near;minDistance:100"}
}
},
"notification"=>{
"callback"=>"http://callback",
"attributes"=>["time"]
}
}
{
"id"=>"...",
"expires"=>"...",
"status"=>"active",
"subject"=>{
"entities"=>[{"id"=>"User-121", "idPattern"=>"", "type"=>"User"}],
"condition"=>{
"attributes"=>["location", "time"],
"expression"=>{
"q"=>"",
"geometry"=>"point",
"coords"=>"59.851484, 30.199463",
"georel"=>"near;maxDistance:100"}
}
},
"notification"=>{
"callback"=>"http://callback",
"attributes"=>["time"]
}
},
{
"id"=>"...",
"expires"=>"...",
"status"=>"active",
"subject"=>{
"entities"=>[{"id"=>"User-121", "idPattern"=>"", "type"=>"User"}],
"condition"=>{
"attributes"=>["location", "time"],
"expression"=>{
"q"=>"",
"geometry"=>"point",
"coords"=>"59.851484, 30.199463",
"georel"=>"equals"}
}
},
"notification"=>{
"callback"=>"http://callback",
"attributes"=>["time"]
}
}