- Newest
- Most votes
- Most comments
The error message you're seeing suggests that the wait_for refresh policy is not supported in your current setup, likely due to the serverless nature of the AWS OpenSearch Service.
Serverless options like AWS OpenSearch Service offer many benefits, but they also come with some limitations due to the abstraction and automatic scaling. Specifically, with serverless options, you do not manage the underlying infrastructure, and therefore certain operations that require explicit knowledge of that infrastructure might not be supported.
In the case of the refresh=wait_for policy, this policy tells OpenSearch to wait for a refresh to make the changes searchable. This requires the system to have control over when a refresh happens, which may not be available in a serverless environment due to the automatic scaling and management.
Unfortunately, if this feature is not supported in the serverless version of OpenSearch, there might not be a direct workaround. However, you could attempt to manually enforce consistency in your application logic. For example, you could introduce a delay after making changes to an index before you attempt to read the data. This is not ideal because the delay would need to be long enough to account for potential variance in refresh times.
Ultimately, the decision between a traditional managed OpenSearch cluster and a serverless OpenSearch collection will depend on the specific needs of your application. If you need a feature like the refresh=wait_for policy, you might need to use a traditional managed OpenSearch cluster.
Relevant content
- asked a month ago
- Accepted Answerasked 9 months ago
- Accepted Answerasked a year ago
- asked 4 months ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 3 months ago
Is there a official statement from AWS regarding whether serverless version of Opensearch don't have support for refresh=wait_for policy? It was in official Opensearch document.