# Performing atomic add operations on LDT (lists/map) during insertion/update

**URL:** https://discuss.aerospike.com/t/performing-atomic-add-operations-on-ldt-lists-map-during-insertion-update/1494
**Category:** C Client Library
**Created:** [July 15, 2015, 5:24am UTC](https://discuss.aerospike.com/t/performing-atomic-add-operations-on-ldt-lists-map-during-insertion-update/1494 "2015-07-15T05:24:16Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![lzuwei](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/lzuwei/32/1005_2.png) [@lzuwei](https://discuss.aerospike.com/u/lzuwei)
#### Post date: [July 15, 2015, 5:24am UTC](https://discuss.aerospike.com/t/performing-atomic-add-operations-on-ldt-lists-map-during-insertion-update/1494/1 "2015-07-15T05:24:16Z")

</div>

Is Aerospike able to perform an atomic addition operation on a LDT Map during an insertion or update operation?

I am storing an inverted index containing unique documents that possess certain properties for fast lookups across the entire database of millions of documents.

The Data Model looks something like this:

cluster id (key) | document ids (LDT Map) 1 | abc : 2, abe: 3, acc: 1 …

suppose I have to update the document abc by adding 3 to the existing record so the result is 5. Does aerospike support this using as\_operation ?

---

<div class="post-metadata">

### Author: ![wchu](https://avatars.discourse-cdn.com/v4/letter/w/a5b964/32.png) [@wchu](https://discuss.aerospike.com/u/wchu)
#### Post date: [July 16, 2015, 2:12am UTC](https://discuss.aerospike.com/t/performing-atomic-add-operations-on-ldt-lists-map-during-insertion-update/1494/2 "2015-07-16T02:12:17Z")

</div>

This can be done via a UDF on the LDT bin. The UDF will be able to perform the add() operation.

Details [http://www.aerospike.com/docs/udf/udfs\_and\_ldts.html](http://www.aerospike.com/docs/udf/udfs_and_ldts.html)
