- Newest
- Most votes
- Most comments
The issue you're experiencing with a null pointer exception after upgrading your OpenSearch managed cluster from 2.19 to 3.1 appears to be related to your range query on the "expiry_at" field.
This type of error can occur during version upgrades when there are compatibility issues with certain query types or when the underlying data structure has changed. The fact that removing the range filter with the "now" value resolves the issue suggests that there might be a specific problem with how the new version handles date range queries using the "now" keyword.
Here are some troubleshooting steps you can try:
-
Check if the "expiry_at" field is properly mapped as a date field in your index.
-
Try using an explicit timestamp instead of "now" in your range query to see if that works.
-
If possible, examine the logs on your OpenSearch cluster for more detailed error information.
-
Consider creating a simpler test query with just the range filter to isolate the issue.
-
If you have multiple shards, the error shows that some shards are failing while others are successful. This could indicate inconsistencies in your data or index configuration across shards.
Since reindexing didn't solve the problem, it suggests this might be a compatibility issue with how date range queries are processed in OpenSearch 3.1 compared to 2.19, particularly when using the "now" keyword.
Sources
Making configuration changes in Amazon OpenSearch Service - Amazon OpenSearch Service
Searching data in Amazon OpenSearch Service - Amazon OpenSearch Service
answered a year ago
Relevant content
- AWS OFFICIALUpdated a month ago
