Java SDK and Prepared Statement

I may have had an error but did not see it by the time I saw the errors on the index not returning any data, it was “too” late…

But I created a simple test to reproduce it and I can see an error on the first request after modifying the indexes and then empty responses:
(AFTER) Errors: [{“msg”:“Index Not Found - cause: queryport.indexNotFound”,“code”:12016}]
(AFTER) Expected doc:204 but nothing returned
(AFTER) Expected doc:285 but nothing returned
(AFTER) Expected doc:892 but nothing returned
(AFTER) Expected doc:777 but nothing returned
(AFTER) Expected doc:080 but nothing returned
(AFTER) Expected doc:846 but nothing returned
(AFTER) Expected doc:504 but nothing returned
(AFTER) Expected doc:188 but nothing returned
(AFTER) Expected doc:647 but nothing returned
(AFTER) Expected doc:000 but nothing returned

The question is, even if I catch the error, how can I make sure the prepared statement is recreated - can’t see in the SDK how to force this to happen as, as you said, it is cached in the SDK.

Thanks,
Laurent.Test.java.zip (2.1 KB)