# Reindex with embeddings

**URL:** <https://discuss.elastic.co/t/reindex-with-embeddings/374088>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-machine-learning, docker\
**Created:** [February 4, 2025, 9:18pm UTC](https://discuss.elastic.co/t/reindex-with-embeddings/374088 "2025-02-04T21:18:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carlos\_Fernando\_Palm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlos_fernando_palm/32/77804_2.png) [@Carlos\_Fernando\_Palm](https://discuss.elastic.co/u/Carlos_Fernando_Palm)\
**Post date:** [February 4, 2025, 9:18pm UTC](https://discuss.elastic.co/t/reindex-with-embeddings/374088/1 "2025-02-04T21:18:21Z")

</div>

I was trying to use the E5 model to generate embeddings for non english documents and I created a field that was a sparse\_vector. The index where I changed the mapping already  
has a sparse\_vector for another embedding and it has been populated.

I think I need a dense vector here, but I already created the mapping as sparse\_vector.

Initially I tried to delete the new property in the mapping but that is impossible. So I arrived here:

> <https://stackoverflow.com/questions/16156565/elasticsearch-delete-mapping-property>

the suggestion is to reindex while at the same time deleting the unwanted property:

```auto
POST /_reindex
{
  "source": {
    "index": "twitter"
  },
  "dest": {
    "index": "new_twitter",
  },
  "script": {
    "inline": "ctx._source.remove('whatever')"
  }
}

```

I tried running something like that but I got an error saying I was trying to reindex more than 1000 fields. I took a look at the task response and realized that every field created by embedding is now treated as a field to be re-indexed. Basically I want my old index back, including the embeddings I had already generated. When I do a clone the new field is present in the mapping for the new index.

Is there a way for me to copy an index that already contains embeddings into another index while at the same time removing this unwanted new embedding field?

---

<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:** [February 5, 2025, 2:30am UTC](https://discuss.elastic.co/t/reindex-with-embeddings/374088/2 "2025-02-05T02:30:49Z")

</div>

Hi @Carlos_Fernando_Palm

Did you try like this?

```auto
POST _reindex
{
  "source": {
    "_source": {
      "includes": ["fielda", "fieldb"] // Specify the fields you want to copy
    },
    "index": "idx_source"
  },
  "dest": {
    "index": "idx_dest"
  }
}

```
