问题
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