Hi chaps
We are currently working with unique indexes via the REST interface and it
seems that we could do with a finer-grained level of control with regards
to the operations available, particularly when batching up a number of
requests.
Currently, we can quite happily call a "get_or_create" style operation
which will return 201 if a node (or relationship) is indexed and 200 if it
one already exists for that key-value pair. A desired alternative however
would be to have a "create_or_fail" type operation which could return 201
or 400 instead. Importantly, this operation would stop the batch in
progress and roll back the transaction.
Perhaps the URI could accept a flag something like:
POST http://localhost:7474/db/data/index/node/people?unique&*fail_if_exists*
WDYT?
Nige