# Store and search binary data

**URL:** https://discuss.elastic.co/t/store-and-search-binary-data/24528
**Category:** Elasticsearch
**Created:** [June 29, 2015, 8:27am UTC](https://discuss.elastic.co/t/store-and-search-binary-data/24528 "2015-06-29T08:27:25Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![eugenfunk](https://avatars.discourse-cdn.com/v4/letter/e/c6cbf5/32.png) [@eugenfunk](https://discuss.elastic.co/u/eugenfunk)
#### Post date: [June 29, 2015, 8:27am UTC](https://discuss.elastic.co/t/store-and-search-binary-data/24528/1 "2015-06-29T08:27:25Z")

</div>

Dear members,  
is it possible to extend elastic search to store and to retrieve binary data?  
I would like to store sparse voxel octrees and search for them by a 3D coordinate (e.g. x,y,z).  
For this, I would like to have a c(++) interface instead of using the http api of ES.

Thank you very much in advance!

---

<div class="post-metadata">

### Author: ![Jason\_Wee](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jason\_Wee](https://discuss.elastic.co/u/Jason_Wee)
#### Post date: [June 29, 2015, 3:01pm UTC](https://discuss.elastic.co/t/store-and-search-binary-data/24528/2 "2015-06-29T15:01:11Z")

</div>

you can store binary but it is not index, not index means to me it is not queryable. [https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-core-types.html#binary](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-core-types.html#binary)

the example given only x and y.. not sure about z, [https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-geo-shape-type.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-geo-shape-type.html)

try it and see?

---

<div class="post-metadata">

### Author: ![eugenfunk](https://avatars.discourse-cdn.com/v4/letter/e/c6cbf5/32.png) [@eugenfunk](https://discuss.elastic.co/u/eugenfunk)
#### Post date: [June 29, 2015, 6:40pm UTC](https://discuss.elastic.co/t/store-and-search-binary-data/24528/3 "2015-06-29T18:40:43Z")

</div>

Thank you! Actually I dont need any other indexing as for the xyz coordinates. Thus the binary storage is perfect.

- Is there a tutorial how to write a filter similar to the geo\_shape Filter? Maybe I can use it as an example and extend it to 3D data.
- Is it possible at all to query data from c++?

---

<div class="post-metadata">

### Author: ![Jason\_Wee](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jason\_Wee](https://discuss.elastic.co/u/Jason_Wee)
#### Post date: [July 1, 2015, 10:59am UTC](https://discuss.elastic.co/t/store-and-search-binary-data/24528/4 "2015-07-01T10:59:57Z")

</div>

if you can read java, you can take a look at these tests how to best use geo query [https://github.com/elastic/elasticsearch/tree/master/core/src/test/java/org/elasticsearch/search/geo/](https://github.com/elastic/elasticsearch/tree/master/core/src/test/java/org/elasticsearch/search/geo/)

take a look at this directory too [https://github.com/elastic/elasticsearch/tree/master/core/src/test/java/org/elasticsearch/index/query](https://github.com/elastic/elasticsearch/tree/master/core/src/test/java/org/elasticsearch/index/query) many tests that start with geo, you might want to take a look.

these are the client in the official page [https://www.elastic.co/guide/en/elasticsearch/client/community/current/clients.html](https://www.elastic.co/guide/en/elasticsearch/client/community/current/clients.html) not sure about cpp, google to see? basically if you know restful concept, you can basically http get to the es cluster and get back the result and process it in cpp.

hth

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 6, 2017, 12:04am UTC](https://discuss.elastic.co/t/store-and-search-binary-data/24528/5 "2017-07-06T00:04:21Z")

</div>


