Storing images in an index


(marko) #1

Hi,

I'm indexing data in ES 2.x and each indexed object will have an associated image that I'd need to store (indexing is not required) somewhere. It would appear logical to store the images also in ES to avoid introducing new dependencies.

Is it a good idea to store images in ES or should I put them somewhere else?
What would be the best way to store images in ES? Should I use the binary or attachment field types or just store images as string using some string encoding?

Is it recommended to store the text and image in the same type or use separate types? Though an image is associated with each textual data object, the lifecycle for producing the text and image may be different.

marko


Image and document upload/download in Elasticsearch
(Mark Walkom) #2

ES isn't really a binary document store, you can do it but it won't be very efficient.

If you want to I'd put the images in their own indices, then the text data elsewhere.


(Nik Everett) #3

Yeah, image storage typically is something better handled by a filesystem. I'd use some shared filesystem for it probably.


(marko) #4

Thanks for your feedback!
I came to the same conclusion and decided to store the images outside of ES.

marko


(system) #5