# How can i get similar images by calculating distance between 128array?

**URL:** <https://discuss.elastic.co/t/how-can-i-get-similar-images-by-calculating-distance-between-128array/171051>\
**Category:** Elasticsearch\
**Created:** [March 6, 2019, 8:22am UTC](https://discuss.elastic.co/t/how-can-i-get-similar-images-by-calculating-distance-between-128array/171051 "2019-03-06T08:22:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![psyapathy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/psyapathy/32/50265_2.png) [@psyapathy](https://discuss.elastic.co/u/psyapathy)\
**Post date:** [March 6, 2019, 8:22am UTC](https://discuss.elastic.co/t/how-can-i-get-similar-images-by-calculating-distance-between-128array/171051/1 "2019-03-06T08:22:48Z")

</div>

Hello!

I have 2 questions:

1. Tell me please i want to index images to ElasticSearch in this view:  
Image ID - number  
Image Name - text  
Image Array - 128 array (like [1.2, 2.0, 0.0 ......... etc])

How can i index this? What type to store the array?

1. Tell me please how can i get similar images by calculating distance between 128array?  
Need plugin? Or ES have a function like a dist in Solr?

I have a certain image. I get 128 array for this image. And I want to ask ES say 10 most similar images based on the entered search in 128 array.

Thank you advance!

---

<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:** [April 3, 2019, 8:22am UTC](https://discuss.elastic.co/t/how-can-i-get-similar-images-by-calculating-distance-between-128array/171051/2 "2019-04-03T08:22:48Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
