Orion Context Broker Using Match Pattern with number

十年热恋 提交于 2019-12-24 10:44:17

问题


For example I have a person like below. I wan to query person has phoneNumber contains "354". I will use the query like this.GET /v2/entities?q=phoneNumber~=354. So is it possible to do the query like this in orion context broker? As I have seen that the match pattern only support target property as string.

Match pattern: ~=. The value matches a given pattern, expressed as a regular expression, e.g. color~=ow. For an entity to match, it must contain the target property (color) and the target property value must match the string in the right-hand side, 'ow' in this example (brown and yellow would match, black and white would not). This operation is only valid for target properties of type string.

http://telefonicaid.github.io/fiware-orion/api/v2/stable/ Section: Simple Query Language

 {
        "type": "Person",
        "isPattern": "false",
        "id": "1",
        "attributes": [
            {
                "name": "phoneNumber",
                "type": "string",
                "value": "0102354678"
            }
        ]
    }

Many thanks.

来源:https://stackoverflow.com/questions/59388850/orion-context-broker-using-match-pattern-with-number

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!