# Adding a backfill to Sentiment Analysis

**URL:** https://meta.discourse.org/t/adding-a-backfill-to-sentiment-analysis/288662
**Category:** Feature
**Tags:** completed, ai, ai-sentiment
**Created:** [October 25, 2023, 11:19pm UTC](https://meta.discourse.org/t/adding-a-backfill-to-sentiment-analysis/288662 "2023-10-25T23:19:46Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![swong](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@swong](https://meta.discourse.org/u/swong)
#### Post date: [October 25, 2023, 11:19pm UTC](https://meta.discourse.org/t/adding-a-backfill-to-sentiment-analysis/288662/1 "2023-10-25T23:19:46Z")

</div>

Will there be any “backfilling” capabilities for this module (to calculate sentiment for pre-existing content)?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [October 25, 2023, 11:23pm UTC](https://meta.discourse.org/t/adding-a-backfill-to-sentiment-analysis/288662/2 "2023-10-25T23:23:19Z")

</div>

Yes, this should be reasonably easy to add (at least a rake task for it)

---

<div class="post-metadata">

### Author: ![JonahAragon1](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@JonahAragon1](https://meta.discourse.org/u/JonahAragon1)
#### Post date: [November 11, 2023, 3:55am UTC](https://meta.discourse.org/t/adding-a-backfill-to-sentiment-analysis/288662/3 "2023-11-11T03:55:24Z")

</div>

Looks quite good on my forum! Is there a way to fill in more of a backlog after installing the plugin (self-hosted)? I’d be interested in running the analysis on all the posts in the last quarter or so in the background.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [November 11, 2023, 12:05pm UTC](https://meta.discourse.org/t/adding-a-backfill-to-sentiment-analysis/288662/4 "2023-11-11T12:05:05Z")

</div>

We will write a proper backfill rake task for this in the coming weeks!

UPDATE: You can now run it with `rake ai:sentiment:backfill`

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [December 14, 2023, 2:53pm UTC](https://meta.discourse.org/t/adding-a-backfill-to-sentiment-analysis/288662/5 "2023-12-14T14:53:01Z")

</div>


