# When do I need to reindex data?

**URL:** <https://discuss.elastic.co/t/when-do-i-need-to-reindex-data/7338>\
**Category:** Elasticsearch\
**Created:** [April 16, 2012, 1:14am UTC](https://discuss.elastic.co/t/when-do-i-need-to-reindex-data/7338 "2012-04-16T01:14:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![benmccann](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benmccann/32/420_2.png) [@benmccann](https://discuss.elastic.co/u/benmccann)\
**Post date:** [April 16, 2012, 1:14am UTC](https://discuss.elastic.co/t/when-do-i-need-to-reindex-data/7338/1 "2012-04-16T01:14:55Z")

</div>

Hi,

I've recently started using elasticsearch and I'm having trouble  
understanding when I need to reindex data.

- What operations cause me to need to reindex data?
- Which of these require creating a new index and for which can I simply  
reuse the same index?
- Are there settings that require the ES nodes to be restarted after  
being updated?
- How do I reindex online if I need to create a new index? I can use a  
scan search to copy the documents from one index to another and then switch  
the alias to point to the new index, but it would seem that I'd have to  
take my regular indexing process offline or have it writing to both or else  
the two indexes would not have the same documents when I switch the alias.

Thanks,  
Ben

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [April 17, 2012, 10:36am UTC](https://discuss.elastic.co/t/when-do-i-need-to-reindex-data/7338/2 "2012-04-17T10:36:39Z")

</div>

You mainly need to reindex the data if you change how data ends up being  
indexed. This include changing things like a field being analyzed or not,  
changing analyzer settings, or changing a type of a field.

The "online" settings that you can change on a live index are listed in the  
update indices settings API, and the cluster update settings API. Any other  
settings for an index require you closing the index, updating the settings,  
and opening it, and on the cluster/node level, requires restarting the node.

On Mon, Apr 16, 2012 at 4:14 AM, Ben McCann [benjamin.j.mccann@gmail.com](mailto:benjamin.j.mccann@gmail.com)wrote:

> Hi,
> 
> I've recently started using elasticsearch and I'm having trouble  
> understanding when I need to reindex data.
> 
> - What operations cause me to need to reindex data?
> - Which of these require creating a new index and for which can I  
> simply reuse the same index?
> - Are there settings that require the ES nodes to be restarted after  
> being updated?
> - How do I reindex online if I need to create a new index? I can use  
> a scan search to copy the documents from one index to another and then  
> switch the alias to point to the new index, but it would seem that I'd have  
> to take my regular indexing process offline or have it writing to both or  
> else the two indexes would not have the same documents when I switch the  
> alias.
> 
> Thanks,  
> Ben

---

<div class="post-metadata">

**Author:** ![Ben\_McCann\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ben_mccann_2/32/1097_2.png) [@Ben\_McCann\_2](https://discuss.elastic.co/u/Ben_McCann_2)\
**Post date:** [April 17, 2012, 1:38pm UTC](https://discuss.elastic.co/t/when-do-i-need-to-reindex-data/7338/3 "2012-04-17T13:38:22Z")

</div>

Thanks. When do I need to create a new index vs when can I just reindex  
using the same index?

On Tue, Apr 17, 2012 at 3:36 AM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> You mainly need to reindex the data if you change how data ends up being  
> indexed. This include changing things like a field being analyzed or not,  
> changing analyzer settings, or changing a type of a field.
> 
> The "online" settings that you can change on a live index are listed in  
> the update indices settings API, and the cluster update settings API. Any  
> other settings for an index require you closing the index, updating the  
> settings, and opening it, and on the cluster/node level, requires  
> restarting the node.
> 
> On Mon, Apr 16, 2012 at 4:14 AM, Ben McCann [benjamin.j.mccann@gmail.com](mailto:benjamin.j.mccann@gmail.com)wrote:
> 
> > Hi,
> > 
> > I've recently started using elasticsearch and I'm having trouble  
> > understanding when I need to reindex data.
> > 
> > - What operations cause me to need to reindex data?
> > - Which of these require creating a new index and for which can I  
> > simply reuse the same index?
> > - Are there settings that require the ES nodes to be restarted after  
> > being updated?
> > - How do I reindex online if I need to create a new index? I can use  
> > a scan search to copy the documents from one index to another and then  
> > switch the alias to point to the new index, but it would seem that I'd have  
> > to take my regular indexing process offline or have it writing to both or  
> > else the two indexes would not have the same documents when I switch the  
> > alias.
> > 
> > Thanks,  
> > Ben

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [April 19, 2012, 1:23pm UTC](https://discuss.elastic.co/t/when-do-i-need-to-reindex-data/7338/4 "2012-04-19T13:23:43Z")

</div>

The same reasons mentioned before, effectively, they mean that you will end  
up with a new index with new mapping behavior.

On Tue, Apr 17, 2012 at 4:38 PM, Ben McCann [ben@benmccann.com](mailto:ben@benmccann.com) wrote:

> Thanks. When do I need to create a new index vs when can I just reindex  
> using the same index?
> 
> On Tue, Apr 17, 2012 at 3:36 AM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:
> 
> > You mainly need to reindex the data if you change how data ends up being  
> > indexed. This include changing things like a field being analyzed or not,  
> > changing analyzer settings, or changing a type of a field.
> > 
> > The "online" settings that you can change on a live index are listed in  
> > the update indices settings API, and the cluster update settings API. Any  
> > other settings for an index require you closing the index, updating the  
> > settings, and opening it, and on the cluster/node level, requires  
> > restarting the node.
> > 
> > On Mon, Apr 16, 2012 at 4:14 AM, Ben McCann [benjamin.j.mccann@gmail.com](mailto:benjamin.j.mccann@gmail.com)wrote:
> > 
> > > Hi,
> > > 
> > > I've recently started using elasticsearch and I'm having trouble  
> > > understanding when I need to reindex data.
> > > 
> > > - What operations cause me to need to reindex data?
> > > - Which of these require creating a new index and for which can I  
> > > simply reuse the same index?
> > > - Are there settings that require the ES nodes to be restarted after  
> > > being updated?
> > > - How do I reindex online if I need to create a new index? I can  
> > > use a scan search to copy the documents from one index to another and then  
> > > switch the alias to point to the new index, but it would seem that I'd have  
> > > to take my regular indexing process offline or have it writing to both or  
> > > else the two indexes would not have the same documents when I switch the  
> > > alias.
> > > 
> > > Thanks,  
> > > Ben

---

<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:** [July 6, 2017, 3:32am UTC](https://discuss.elastic.co/t/when-do-i-need-to-reindex-data/7338/5 "2017-07-06T03:32:02Z")

</div>


