indexing - Apparent Race condition when deleting and recreating a elasticsearch index via the Java API -


i getting error - index exists when creating index deleted. below simple test created replicate behaviour:

        client elasticsearchclient = elasticsearchlocalservice.getclient();         if (elasticsearchclient.admin().indices().exists(new indicesexistsrequest(indexname)).get().isexists())             elasticsearchclient.admin().indices().delete(new deleteindexrequest(indexname)).get();         elasticsearchclient.admin().indices().exists(new indicesexistsrequest(indexname)).get().isexists();//returns false         elasticsearchclient.admin().indices().create(new createindexrequest(indexname)).get(); 

even though second call check if index exists returns false still error, i've tried refresh index think affects data. expected .get on delete block until finished.

thanks !


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -