# Reindex with \`term\_vector\` results in deleted docs

**URL:** https://discuss.elastic.co/t/reindex-with-term-vector-results-in-deleted-docs/164956
**Category:** Elasticsearch
**Created:** [January 20, 2019, 7:15pm UTC](https://discuss.elastic.co/t/reindex-with-term-vector-results-in-deleted-docs/164956 "2019-01-20T19:15:08Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![workmanw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/workmanw/32/35517_2.png) [@workmanw](https://discuss.elastic.co/u/workmanw)
#### Post date: [January 20, 2019, 7:15pm UTC](https://discuss.elastic.co/t/reindex-with-term-vector-results-in-deleted-docs/164956/1 "2019-01-20T19:15:08Z")

</div>

I've been testing out the text mapping properties `stored: true` and `term_vector: with_positions_offsets` for text highlighting. Really I wanted to understand the impacts to storage on disk. I'm starting with an existing index, create a new mapping and using the Reindex API. Here is the existing mapping:

```
{
  "mappings": {
    "_doc": {
      "dynamic": "strict",
      "properties": {
        "title": { "type": "text", "copy_to": "all_text" },
        "body": { "type": "text", "copy_to": "all_text" },
        "all_text": { "type": "text" }
      }
    }
  }
}

```

I set the `all_text` field to be stored (`"all_text": { "type": "text", "stored": true }`) and ran the reindex, then used the `cat` API to check sizes. Index increased as expected:

```auto
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
green open original 7rHkEB-sSf-uFXlvpzqpvA 5 1 1774199 479693 1.3gb 689.1mb
green open stored WLk2LW4WTtKw0cDve31poQ 5 1 1774199 0 1.4gb 727.3mb

```

Then I set the `all_text` field with term\_vector (`"all_text": { "type": "text", "term_vector": "with_positions_offsets" }`). Again as expected the new index was larger. See:

```auto
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
green open original 7rHkEB-sSf-uFXlvpzqpvA 5 1 1774199 479693 1.3gb 689.1mb
green open term-vectors f0IvAEMURYmgXsCA0cW-dQ 5 1 1776469 546468 2gb 1023.7mb

```

But something I found peculiar and it's the heart of this question, why are there deleted docs in the `term-vectors` index? There weren't in the `stored` index. I repeated these tests multiple times and got the same results. It's not causing a problem, I just felt like there was something I was missing.

---

<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: [February 17, 2019, 7:15pm UTC](https://discuss.elastic.co/t/reindex-with-term-vector-results-in-deleted-docs/164956/2 "2019-02-17T19:15:16Z")

</div>

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