"Race condition" in Java

Yes, that is normal. Search in Elasticsearch is near real-time, which means changes will only show up in search results (or be removed from it in your case) after a refresh has occurred, and this is a periodic task as it is expensive.