Store and search binary data


(eugen) #1

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!


(Jason Wee) #2

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

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

try it and see?


(eugen) #3

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++?

(Jason Wee) #4

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/

take a look at this directory too 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 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


(system) #5