Explicit exception is thrown when doing Spatial Search by GeoDistance
Every request as the following:
curl --location --request POST 'https://epamosdu-ip.centralus.cloudapp.azure.com/api/search/v2/query' \
--header 'Authorization: Bearer {{TOKEN}}' \
--header 'Content-Type: application/json' \
--header 'data-partition-id: opendes' \
--data-raw '{
"kind": "opendes:wks:master-data--Wellbore:1.0.0",
"spatialFilter": {
"field": "data.SpatialLocation.Wgs84Coordinates",
"byDistance": {
"point": {
"longitude": 5.1580810546875,
"latitude": 52.859180945520826
},
"distance": 1000
}
}
}'
Throws 500 error:
2021-04-13 19:10:12.222 DEBUG search-service-7f575d4574-dj476 --- [-nio-80-exec-24] .m.m.a.ExceptionHandlerExceptionResolver correlation-id=02c98219-84dc-4ac3-b324-bae3b7f7ce3d data-partition-id=newpartitiontest: Resolved [AppException(error=AppError(code=500, reason=Search error, message=Error processing search request, errors=null, debuggingInfo=null, originalException=AppException(error=AppError(code=404, reason=Distance query is not supported for GeoShape field, message=Invalid request, errors=null, debuggingInfo=null, originalException=null), originalException=null)), originalException=AppException(error=AppError(code=404, reason=Distance query is not supported for GeoShape field, message=Invalid request, errors=null, debuggingInfo=null, originalException=null), originalException=null))]
due to the following: Azure provider exception. But also other providers looks have the same exception: GCP provider exception AWS provider exception IBM provider exception
Just wanted to point out that referred elastic issue may be already resolved and therefore the code may need to be updated.