Search returning bool fields as strings
It seems that the search API (or maybe indexer) has started treating bool fields as strings. We have records containing bool fields. An example is this one recently created:
curl -X 'GET' \
'https://evt.api.enterprisedata.cloud.slb-ds.com/api/storage/v2/records/slb-osdu-dev-sis-internal-hq%3Are-az-qa%3A01hp4deth6hwwq7xra5q3s36a4' \
-H 'accept: application/json' \
-H 'data-partition-id: slb-osdu-dev-sis-internal-hq' \
-H 'Authorization: Bearer <stoken>' \
-H 'Accept: */*;'
it contains the field:
"ensemble": true,
However if you get the same record via search:
curl -X 'POST' \
'https://evt.api.enterprisedata.cloud.slb-ds.com/api/search/v2/query' \
-H 'accept: application/json' \
-H 'data-partition-id: slb-osdu-dev-sis-internal-hq' \
-H 'Authorization: Bearer <stoken>' \
-H 'Content-Type: application/json' \
-H 'Accept: */*;' \
-d '{
"kind": "slb-osdu-dev-sis-internal-hq:re-az-qa:model:1.2.0",
"query": "data.id:01hp4deth6hwwq7xra5q3s36a4"
}'
the value of the field is now quoted and looks like:
"ensemble": "true",
This is a change in behaviour. For a record create a little while back like this
curl -X 'GET' \
'https://evt.api.enterprisedata.cloud.slb-ds.com/api/storage/v2/records/slb-osdu-dev-sis-internal-hq%3Are-az-qa%3A01hp21e0rk0e6thxy8b5vp269p' \
-H 'accept: application/json' \
-H 'data-partition-id: slb-osdu-dev-sis-internal-hq' \
-H 'Authorization: Bearer <stoken>' \
-H 'Accept: */*;'
we get the record with the field
"ensemble": true,
as expected and the search API returns the same un-quoted field.
curl -X 'POST' \
'https://evt.api.enterprisedata.cloud.slb-ds.com/api/search/v2/query' \
-H 'accept: application/json' \
-H 'data-partition-id: slb-osdu-dev-sis-internal-hq' \
-H 'Authorization: Bearer <stoken>' \
-H 'Content-Type: application/json' \
-H 'Accept: */*;' \
-d '{
"kind": "slb-osdu-dev-sis-internal-hq:re-az-qa:model:1.2.0",
"query": "data.id:01hp21e0rk0e6thxy8b5vp269p"
}'
Edited by Yauheni Lesnikau