# Vector functions in script fields context

**URL:** <https://discuss.elastic.co/t/vector-functions-in-script-fields-context/378254>\
**Category:** Elasticsearch\
**Tags:** painless\
**Created:** [May 17, 2025, 12:02am UTC](https://discuss.elastic.co/t/vector-functions-in-script-fields-context/378254 "2025-05-17T00:02:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ksalomatin](https://avatars.discourse-cdn.com/v4/letter/k/97f17d/32.png) [@ksalomatin](https://discuss.elastic.co/u/ksalomatin)\
**Post date:** [May 17, 2025, 12:02am UTC](https://discuss.elastic.co/t/vector-functions-in-script-fields-context/378254/1 "2025-05-17T00:02:18Z")

</div>

Hi!

I need to compute two vector similarities during search and return them as fields. Both fields are needed for downstream processing, so I cannot use scoring context that only returns a single combined score. This old 2020 [thread](https://discuss.elastic.co/t/allow-vector-functions-in-script-fields-context/247884) covers this topic (as impossible) but I'm not sure if things progressed since then and if there is a workaround.

Thanks
