Hello.
I have a field of type JSON object
called technical_details
. It stores stuff that are not requires by all entities, but still common among many. Here’s an example:
{
"weight": {
"units": "kg",
"value": 16300
},
"width": {
"units": "m",
"value": 2.5
},
"heigth": {
"units": "m",
"value": 3.24
},
"length": {
"units": "m",
"value": 5.78
},
"workingheigth": {
"units": "m",
"value": 26.5
},
... more technical details ...
}
I want to query on these fields. Get all items where width is greater that X and length smaller than Y.
Something like this:
This works, as the artNr field is an Integer field. But I cannot seem to the this same logic to work on a JSON object field:
Any version of these range operators I’ve testes on a JSON object field gives an error like this:
{
"sys": {
"type": "Error",
"id": "InvalidQuery"
},
"message": "The query you sent was invalid. Probably a filter or ordering specification is not applicable to the type of a field.",
"details": {
"errors": [
{
"name": "unknown",
"path": [
"fields",
"technicalDetails",
"nb-NO",
"Bredde",
"value"
],
"details": "The path \"fields.technicalDetails.nb-NO.Bredde.value\" is not recognized"
}
]
},
"requestId": "ff5...b9"
}
Are these range queries not applicable to JSON object fields?