# Using Aerospike as a content store / Can I insert a large document using Java Client?

**URL:** <https://discuss.aerospike.com/t/using-aerospike-as-a-content-store-can-i-insert-a-large-document-using-java-client/126>\
**Category:** Use Cases\
**Created:** [August 15, 2014, 11:48pm UTC](https://discuss.aerospike.com/t/using-aerospike-as-a-content-store-can-i-insert-a-large-document-using-java-client/126 "2014-08-15T23:48:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![oldforum](https://avatars.discourse-cdn.com/v4/letter/o/13edae/32.png) [@oldforum](https://discuss.aerospike.com/u/oldforum)\
**Post date:** [August 15, 2014, 11:48pm UTC](https://discuss.aerospike.com/t/using-aerospike-as-a-content-store-can-i-insert-a-large-document-using-java-client/126/1 "2014-08-15T23:48:39Z")

</div>

Can we use aerospike as a content store to store multiple documents ? If so then can you please point me to a sample Java implementation ?

---

<div class="post-metadata">

**Author:** ![drj\_aerospike](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/drj_aerospike/32/28_2.png) [@drj\_aerospike](https://discuss.aerospike.com/u/drj_aerospike)\
**Post date:** [August 15, 2014, 11:49pm UTC](https://discuss.aerospike.com/t/using-aerospike-as-a-content-store-can-i-insert-a-large-document-using-java-client/126/2 "2014-08-15T23:49:07Z")

</div>

This can definitely be done for smaller objects by storing each object in a different bin. Basically, you would store each document as a blob.

However, we have seen your other questions on the forum and since your objects are so large (perhaps larger than 100GB), this is not a practical solution for you.

---

<div class="post-metadata">

**Author:** ![oldforum](https://avatars.discourse-cdn.com/v4/letter/o/13edae/32.png) [@oldforum](https://discuss.aerospike.com/u/oldforum)\
**Post date:** [August 15, 2014, 11:49pm UTC](https://discuss.aerospike.com/t/using-aerospike-as-a-content-store-can-i-insert-a-large-document-using-java-client/126/3 "2014-08-15T23:49:26Z")

</div>

Can you let me know the Java API that i can use for smaller objects to store in different bins.

---

<div class="post-metadata">

**Author:** ![helipilot50](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/helipilot50/32/59_2.png) [@helipilot50](https://discuss.aerospike.com/u/helipilot50)\
**Post date:** [June 11, 2015, 1:12am UTC](https://discuss.aerospike.com/t/using-aerospike-as-a-content-store-can-i-insert-a-large-document-using-java-client/126/4 "2015-06-11T01:12:01Z")

</div>

Hi

A document is usually a List containing Lists and Maps or a Map containing Lists and Maps.

An Aerospike record can contain one or more Bins. A Bin can contain a string, a long, a blob, a List or a Map. A List or a Map is a complex object and you can store a document in it.

Use the factory method `value1 = Value.get(...)` and passing a Java List or Map. Put this value in a bin instance `new Bin("doc1", value1)`.

Store the data using:

`client.put(null, key, new Bin("doc1", value1), new Bin("doc2", value2)`

I hope this helps
