AZURE M14: Nested Spud date Search throws 400 error
When searching for a well with a spud date using the following query a 400 error is returned:
curl --location --request POST 'https://osdu-ship.msft-osdu-test.org/api/search/v2/query' \
--header 'Content-Type: application/json' \
--header 'data-partition-id: opendes' \
--header 'Authorization: Bearer ...' \
--data-raw '{
"kind": "osdu:wks:master-data--Well:1.0.0",
"query": "(nested(data.FacilityEvents, (EffectiveDateTime: [1901-05-01 TO 1972-06-01] AND FacilityEventTypeID:\"opendes:reference-data--FacilityEventType:SPUD\")))",
"limit": 5,
"returnedFields": ["id","kind","data.FacilityEvents"],
"offset": 0
}'
Response:
{
"code": 400,
"reason": "Bad Request",
"message": "failed to create query: [nested] failed to find nested object under path [data.FacilityEvents]"
}
This same request works in the other pre shipping M14 environments.
There are wells that have the data.FacilityEvents field populated as shown below:
curl --location --request POST 'https://osdu-ship.msft-osdu-test.org/api/search/v2/query' \
--header 'Content-Type: application/json' \
--header 'data-partition-id: opendes' \
--header 'Authorization: Bearer ...' \
--data-raw '{
"kind": "osdu:wks:master-data--Well:*.*.*",
"query": "id:\"opendes:master-data--Well:ceb2fb4c35b042b5ba9e815785050b7f\"",
"returnedFields": [
"id",
"kind",
"data.FacilityEvents"
]
}'
Response:
{
"results": [
{
"data": {
"FacilityEvents": [
{
"EffectiveDateTime": "1971-02-16T00:00:00+0000",
"FacilityEventTypeID": "opendes:reference-data--FacilityEventType:Spud:"
},
{
"EffectiveDateTime": "1971-04-16T00:00:00+0000",
"FacilityEventTypeID": "opendes:reference-data--FacilityEventType:TDReached:"
}
]
},
"kind": "osdu:wks:master-data--Well:1.0.0",
"id": "opendes:master-data--Well:ceb2fb4c35b042b5ba9e815785050b7f"
}
],
"aggregations": null,
"totalCount": 1
}
I checked the osdu:wks:master-data--Well:1.0.0 and the well schema being used is identical to the one in the AWS M14 pre shipping environment.