aerospike / aerospike-client-java

Aerospike Java Client Library
Other
236 stars 212 forks source link

createIndex should return whether index already exists #88

Closed Aloren closed 6 years ago

Aloren commented 6 years ago

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.

BrianNichols commented 6 years ago

For versions >= 4.1.0: If the index already exists, createIndex() will throw an exception. The exception resultCode will be ResultCode.INDEX_ALREADY_EXISTS.

Aloren commented 6 years ago

Great news! Thank you!