code in v2.3.3
IndexResponse idxResp=getIndex().setId(documentDto.getId().toString()).setSource(source).setRefresh(true).execute().actionGet();
While upgrading from ES v2.3.3 to ES v5.6.2, I am facing the error: "Could not resolve symbol : variable IMMEDIATE" at the following line of code-
code for v5.6.2-
IndexResponse idxResp=getIndex().setId(documentDto.getId().toString()).setSource(source).setRefresh(IMMEDIATE).execute().actionGet();
I have even tried setRefreshPolicy(RefreshPolicy.IMMEDIATE), but it didn't work.
Please Help.
BTW you should move to the Rest Client as the TransportClient is now deprecated.
Also, I'd recommend using the latest 5.x version or event better move to 6.x...
By it did not work, I mean that the error "IMMEDIATE variable could not be found" still persists even after using setRefrreshPolicy(RefreshPolicy.IMMEDIATE).
During initial upgrades I was trying with Rest client but then I was facing some issue so I decided to stay with Transport client as suggested by Tim Vernum in this post-
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.