# How to store the vectors (arrays) and get the Euclidean distance for the search request?

**URL:** <https://discuss.elastic.co/t/how-to-store-the-vectors-arrays-and-get-the-euclidean-distance-for-the-search-request/171710>\
**Category:** Elasticsearch\
**Created:** [March 11, 2019, 9:26am UTC](https://discuss.elastic.co/t/how-to-store-the-vectors-arrays-and-get-the-euclidean-distance-for-the-search-request/171710 "2019-03-11T09:26:46Z")\
**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 11, 2019, 9:26am UTC](https://discuss.elastic.co/t/how-to-store-the-vectors-arrays-and-get-the-euclidean-distance-for-the-search-request/171710/1 "2019-03-11T09:26:47Z")

</div>

Hello.

I have 2 questions

1. I want to store arrays of images obtained from numpy (Python) Arrays, for example, are as follows: [1.1, 2.2, 3.3, 4.4, 5.5, 6.6] How can they be indexed?
2. Let's say they are indexed. We have an array [1.2, 2.4, 3.5, 4.9, 5.0, 6.7] It's not in the index. But we need to get as similar to it. Ideally, when you request to receive multiple responses of the form:
3. 
  - array
  - the number of Euclidean distance

4. 
  - array
  - the number of Euclidean distance

5. 
  - array
  - the number of Euclidean distance

like nearest neighbors

Something similar is announced in future versions. But I would like to know if there are any solutions now? The plug-ins? 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 8, 2019, 9:26am UTC](https://discuss.elastic.co/t/how-to-store-the-vectors-arrays-and-get-the-euclidean-distance-for-the-search-request/171710/2 "2019-04-08T09:26:58Z")

</div>

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