# What is \_recovery\_source field?

**URL:** https://discuss.elastic.co/t/what-is-recovery-source-field/320108
**Category:** Elasticsearch
**Tags:** vector-search
**Created:** [November 30, 2022, 5:55am UTC](https://discuss.elastic.co/t/what-is-recovery-source-field/320108 "2022-11-30T05:55:11Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ruslaniv](https://avatars.discourse-cdn.com/v4/letter/r/9de053/32.png) [@ruslaniv](https://discuss.elastic.co/u/ruslaniv)
#### Post date: [November 30, 2022, 5:55am UTC](https://discuss.elastic.co/t/what-is-recovery-source-field/320108/1 "2022-11-30T05:55:11Z")

</div>

I have initiated indexing operation via python client that was abnormally terminated. When I ran

```auto
curl --location --request POST 'http://127.0.0.1:9200/index_name.vec/_disk_usage?run_expensive_tasks=true

```

to analyze the current index, I noticed that there is a `_recovery_source` field that based on its size contains raw `dense_vector` field data in float representation taking a lot of space.

```auto
"index_vector": {
                "store_size": "29.3mb",
                "all_fields": {
                    "total": "29.3mb",
                    "inverted_index": {
                        "total": "50.4kb",
                    },
                "stored_fields": "23.2mb",
                "doc_values": "286.6kb",
                "points": "14.2kb",
                "norms": "1.3kb",
                "term_vectors": "0b",
                "knn_vectors": "5.7mb",
        }

"_recovery_source": {
                "total": "21.8mb",
                "inverted_index": {
                    "total": "0b",
                },
                "stored_fields": "21.8mb",
                "doc_values": "0b",
                "points": "0b",
                "norms": "0b",
                "term_vectors": "0b",
                "knn_vectors": "0b",

 "_source": {
                "total": "1.3mb",
                "inverted_index": {
                    "total": "0b",
                },
                "stored_fields": "1.3mb",
                "doc_values": "0b",
                "points": "0b",
                "norms": "0b",
                "term_vectors": "0b",
                "knn_vectors": "0b",

```

Based on its name I can guess that this field is used for some recovery operations on the index but if it is storing raw dense vectors without any compression, then it's going to take a lot of space.  
See:

> [@Dense vector field space requirements](https://discuss.elastic.co/t/dense-vector-field-space-requirements/316304):
>
> Hi! We are experimenting with dense vector field type for the purpose of similarity search. So we have a test index with approx 5\_000\_000 documents, each document has about 30 fields and 25 of these fields are mapped to both keyword AND text. So I created a new index, where 24 of these 25 fields were set only to keyword AND index set to False. And only one field mapped to dense\_vector with 768 dimensions and index set to True. After indexing 500\_000 documents we have noticed that the index s…

> [@How to exclude dense\_vector field from being stored](https://discuss.elastic.co/t/how-to-exclude-dense-vector-field-from-being-stored/320034):
>
> How can I exclude dense\_vector field from being stored in the \_source? I ran an experiment indexing approximately 6\_000\_000 documents and here is what I found out after running curl --location --request POST 'http://127.0.0.1:9200/index\_name.vec/\_disk\_usage?run\_expensive\_tasks=true The dense\_vector field indeed takes approximately 4 Kb in the index: (4 × 1024 + 4) / 1024 / 1024 / 1024 × (5872381 + 777907) = 25,3 Gb which is confirmed by: "knn\_vectors": "26.2gb" But it is also storing dens…

So I was wondering what this field is used for and how can I disable it or at least disable dense vectors from being included in this field?

---

<div class="post-metadata">

### Author: ![BenTrent](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bentrent/32/33915_2.png) [@BenTrent](https://discuss.elastic.co/u/BenTrent)
#### Post date: [November 30, 2022, 2:32pm UTC](https://discuss.elastic.co/t/what-is-recovery-source-field/320108/2 "2022-11-30T14:32:37Z")

</div>

Recovery source is SUPPOSED to go away after segments are merged.

See: [Indices with "\_source.enabled: false" same size as indices with "\_source.enabled: true" · Issue #41628 · elastic/elasticsearch · GitHub](https://github.com/elastic/elasticsearch/issues/41628)

It is effectively use by cross-cluster replication and shard disaster recoveries.

---

<div class="post-metadata">

### Author: ![ruslaniv](https://avatars.discourse-cdn.com/v4/letter/r/9de053/32.png) [@ruslaniv](https://discuss.elastic.co/u/ruslaniv)
#### Post date: [December 1, 2022, 9:54am UTC](https://discuss.elastic.co/t/what-is-recovery-source-field/320108/3 "2022-12-01T09:54:15Z")

</div>

Unfortunately it stays:

> [@How to exclude dense\_vector field from being stored](https://discuss.elastic.co/t/how-to-exclude-dense-vector-field-from-being-stored/320034/7):
>
> Yes I did run POST no\_vector\_in\_source/\_forcemerge?max\_num\_segments=1 but it did not help

---

<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: [December 29, 2022, 9:54am UTC](https://discuss.elastic.co/t/what-is-recovery-source-field/320108/4 "2022-12-29T09:54:58Z")

</div>

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