M Akin
M Akin

Reputation: 517

OpenSearch index change not reflected in search

When we delete an item form the cache and then immediate do a search the search does not reflect the recent deletion.  

The search happens immediately after the index deletion or update.

How can I fix this? I don't see an aws configuration setting that will ensure the index is updated fully before returning.

Upvotes: 0

Views: 1608

Answers (1)

M Akin
M Akin

Reputation: 517

I was able to get it fixed by adding the "?refresh=wait_for" on the query string.

like DELETE /invoices/306?refresh=wait_for

This is a link to the ElasticSearch version of this problem here is a link to the OpenSearch docs. Pay attention to the refresh parameter.

Upvotes: 1

Related Questions