Currently createIndex operation in AerospikeClient returns IndexTask for both cases: index does not exist, index already exists. In case we want to know whether it existed previously there are no means of doing it with current API.
For versions >= 4.1.0: If the index already exists, createIndex() will throw an exception. The exception resultCode will be ResultCode.INDEX_ALREADY_EXISTS.
Currently
createIndex
operation inAerospikeClient
returnsIndexTask
for both cases: index does not exist, index already exists. In case we want to know whether it existed previously there are no means of doing it with current API.