# Java Client: How to set \_source.exclude\_vectors: false when searching an index?

**URL:** <https://discuss.elastic.co/t/java-client-how-to-set-source-exclude-vectors-false-when-searching-an-index/383737>\
**Category:** Elastic Search\
**Tags:** docker\
**Created:** [November 27, 2025, 1:34pm UTC](https://discuss.elastic.co/t/java-client-how-to-set-source-exclude-vectors-false-when-searching-an-index/383737 "2025-11-27T13:34:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![baekgwa](https://avatars.discourse-cdn.com/v4/letter/b/f9ae1b/32.png) [@baekgwa](https://discuss.elastic.co/u/baekgwa)\
**Post date:** [November 27, 2025, 1:34pm UTC](https://discuss.elastic.co/t/java-client-how-to-set-source-exclude-vectors-false-when-searching-an-index/383737/1 "2025-11-27T13:34:59Z")

</div>

Hello everyone,

I am currently working with Elasticsearch server version **9.2.0**.  
I would like to retrieve vector fields in search responses by specifying:

```auto
"_source": {
  "exclude_vectors": false
}

```

However, when using the **Elasticsearch Java Client** (`elasticsearch-java`), I cannot find a way to set this option in `SearchRequest.Builder` or `SourceConfig`.

Currently, I can only control `_source` at a general field level using `includes` or `excludes`, but I need a way to explicitly **rehydrate vector fields** in the search results.

Could you please advise if there is a supported way to achieve this in the Java Client, or if this is a missing feature?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [November 27, 2025, 2:31pm UTC](https://discuss.elastic.co/t/java-client-how-to-set-source-exclude-vectors-false-when-searching-an-index/383737/2 "2025-11-27T14:31:41Z")

</div>

What does the mappings for the index look like?
