Save Image in Elasticsearch with Ruby
问题 I'm using Elasticsearch as a datastore for my Ruby/Sinatra app, and I'm wanting to save images. Is there a way to index an image as a binary into ES? If so, how should I go about doing this and then converting the binary back to an image in order to display it on the site? 回答1: Elasticsearch can store binary data using the binary type. The binary type needs to be base64 encoded and will not be indexed by default. Here is an example es mapping POST http://localhost:9200/adimages/ { "mappings"