- Newest
- Most votes
- Most comments
This appears to be a potential issue with the _geo_distance sort functionality in OpenSearch 3.1 when using Advanced Security features.
The error you're encountering ("Cannot invoke "String.endsWith(String)" because "field" is null") suggests there might be a bug in how the _geo_distance sort handles non-meter units when Advanced Security is enabled. The fact that the query works when the unit is omitted or set to "m" (meters), but fails with other units like "mi" (miles), points to a specific issue with unit conversion in this security context.
Since the same query works on your VPC cluster without Advanced Security enabled, this strongly suggests the issue is related to the interaction between the _geo_distance functionality and the Advanced Security features in OpenSearch 3.1.
As a workaround, you could:
- Continue using "m" as your unit and perform any necessary conversions in your application code
- Consider temporarily disabling Advanced Security if feasible for your use case
- Revert to a previous version of OpenSearch if this functionality is critical
I would recommend contacting AWS Support about this issue, as they can investigate further and potentially provide a patch or more specific guidance. This appears to be a legitimate bug that should be addressed by the OpenSearch Service team.
Sources
Open-Source Search Engine – Amazon OpenSearch Service Resources – Amazon Web Services
answered a year ago
Relevant content
asked 2 years ago
- AWS OFFICIALUpdated 3 years ago
