# Bulk searching in approximate kNN

**URL:** <https://discuss.elastic.co/t/bulk-searching-in-approximate-knn/364027>\
**Category:** Elasticsearch\
**Tags:** vector-search\
**Created:** [July 30, 2024, 7:30am UTC](https://discuss.elastic.co/t/bulk-searching-in-approximate-knn/364027 "2024-07-30T07:30:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![duty\_sloth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/duty_sloth/32/136387_2.png) [@duty\_sloth](https://discuss.elastic.co/u/duty_sloth)\
**Post date:** [July 30, 2024, 7:30am UTC](https://discuss.elastic.co/t/bulk-searching-in-approximate-knn/364027/1 "2024-07-30T07:30:26Z")

</div>

Hi,  
I tried using bulk search in my approximate kNN (aNN) searches to improve throughput and it did help.  
However I cannot understand from the results which hit referes to which query\_vector.  
For example if I search for 2 query\_vectors in the same search request, and specify k=5, I will get 10 hits.  
I expected it to be in the format of "5 hits refer to query\_vector1, 5 hits refer to query\_vector2", But it is not.

Is there a way to achieve what I described? Or any plan to?  
Thanks!

---

<div class="post-metadata">

**Author:** ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)\
**Post date:** [July 30, 2024, 11:28am UTC](https://discuss.elastic.co/t/bulk-searching-in-approximate-knn/364027/2 "2024-07-30T11:28:21Z")

</div>

Hi @duty_sloth

You could use [multi search api](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html#search-multi-search-api-response-body) in this case.  
In the response array you will have the response for each query in the same order as the request.
