# Use ELSER on data already in elastic

**URL:** https://discuss.elastic.co/t/use-elser-on-data-already-in-elastic/373911
**Category:** Elasticsearch
**Tags:** elastic-stack-machine-learning
**Created:** [January 30, 2025, 4:54pm UTC](https://discuss.elastic.co/t/use-elser-on-data-already-in-elastic/373911 "2025-01-30T16:54:42Z")
**Posts on this page:** 3
**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: [January 30, 2025, 4:54pm UTC](https://discuss.elastic.co/t/use-elser-on-data-already-in-elastic/373911/1 "2025-01-30T16:54:42Z")

</div>

I was going through the documentation for the ELSER model and I keep seeing that when using an inference point the model is applied to the data at ingestion time. Is there a way to populate the semantic\_text field for data already in elastic? a command for that?  
Thanks!

---

<div class="post-metadata">

### Author: ![iulia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/iulia/32/124658_2.png) [@iulia](https://discuss.elastic.co/u/iulia)
#### Post date: [February 3, 2025, 11:53am UTC](https://discuss.elastic.co/t/use-elser-on-data-already-in-elastic/373911/2 "2025-02-03T11:53:50Z")

</div>

Hey Carlos,

You can use a pipeline to re-index data that already exists in Elastic. In a lot of the examples this pipeline is applied at ingest time; but you can run such a pipeline at any other time and on different source datasets.

Check out [this tutorial](https://www.elastic.co/guide/en/elasticsearch/reference/current/semantic-search-semantic-text.html) for example. You can ignore the first step that generates the starting data (assume this is the data you already have in Elastic), and directly use the `reindex` command:

```auto
POST _reindex?wait_for_completion=false
{
  "source": {
    "index": "test-data",
    "size": 10 
  },
  "dest": {
    "index": "semantic-embeddings"
  }
}

```

This will create a new index that also contains the newly generated `semantic_text` field (you can also define the name for the target field or the data structure in the index mapping).

[Here is another notebook example](https://colab.research.google.com/github/elastic/elasticsearch-labs/blob/main/notebooks/search/09-semantic-text.ipynb)

Or a [similar question with some more relevant code examples](https://discuss.elastic.co/t/using-elser-for-multiple-fields/341347)

---

<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, 8:15pm UTC](https://discuss.elastic.co/t/use-elser-on-data-already-in-elastic/373911/3 "2025-02-04T20:15:04Z")

</div>

I ended up using a slightly modified version of your example that specifically references the pipeline I wanted to use:

```auto
POST _reindex?wait_for_completion=false
{
  "source": {
    "index": "source-index",
    "size": 50 
  },
  "dest": {
    "index": "destination-index",
    "pipeline": "elser-v2-test"
  }
}

```

But thanks for the answer!
