query_by_cursor functionality in Search API is not working in consistent manner in IBM R3 M13 pre-ship Environment
The second request to get the next set of records. (Some times it is successful and sometimes it is NOT)
curl --location --request POST 'https://cpd-osdu.odi-og-osdu-ba8e38d4c011d627379af1a4280c4e35-0000.us-south.containers.appdomain.cloud/osdu-search/api/search/v2/query_with_cursor'
--header 'Content-Type: application/json'
--header 'data-partition-id: opendes'
--header 'Authorization: Bearer eyJhbGciOi...BRuqOwYQ'
--data-raw '{
"cursor": "",
"kind" : "osdu:wks:master-data--Well:1.0.0",
"limit" : 2,
"query" : "*",
"data.source": "TNO",
"returnedFields" : [ "kind","id" ],
"queryAsOwner" : false,
"spatialFilter" : {
"field": "data.GeoLocation",
"geometries": {
"topLeft": {
"longitude": 4.9493408203125,
"latitude": 52.859180945520826
},
"bottomRight": {
"longitude": 5.1580810546875,
"latitude": 52.75956761546834
}
}
}
} ' Response: 200 OK { "cursor": "E2BCA94BB3FFB16ED25A62803C6E3043", "results": [ { "kind": "osdu:wks:master-data--Well:1.0.0", "id": "opendes:master-data--Well:3180" }, { "kind": "osdu:wks:master-data--Well:1.0.0", "id": "opendes:master-data--Well:3309" } ], "totalCount": 5965 }
The second request is to get the next 2 records. (Some times it is successful and sometimes it is NOT)
curl --location --request POST 'https://cpd-osdu.odi-og-osdu-ba8e38d4c011d627379af1a4280c4e35-0000.us-south.containers.appdomain.cloud/osdu-search/api/search/v2/query_with_cursor'
--header 'Content-Type: application/json'
--header 'data-partition-id: opendes'
--header 'Authorization: Bearer eyJhbGciOi...BRuqOwYQ'
--data-raw '{
"cursor": "E2BCA94BB3FFB16ED25A62803C6E3043",
"kind" : "osdu:wks:master-data--Well:1.0.0",
"limit" : 2,
"query" : "*",
"data.source": "TNO",
"returnedFields" : ["kind","id" ],
"queryAsOwner" : false,
"spatialFilter" : {
"field": "data.GeoLocation",
"geometries": {
"topLeft": {
"longitude": 4.9493408203125,
"latitude": 52.859180945520826
},
"bottomRight": {
"longitude": 5.1580810546875,
"latitude": 52.75956761546834
}
}
}
} '
Response: { "code": 400, "reason": "Can't find the given cursor", "message": "The given cursor is invalid or expired" }
The collection used for testing can be found here https://community.opengroup.org/osdu/platform/pre-shipping/-/blob/main/R3-M13/Test_Plan_Results_M13/AdvanceSearch/Search%20API%20Advance%20R3%20CI-CD%20v1.0.postman_collection.json The results can found in following folder: https://community.opengroup.org/osdu/platform/pre-shipping/-/tree/main/R3-M13/Test_Plan_Results_M13/AdvanceSearch
Note: These requests are passing/executing successfully in all the other CSP environments.