# Ferret rebuild\_index

**URL:** <https://www.ruby-forum.com/t/ferret-rebuild-index/196711>\
**Category:** Rails\
**Created:** [June 12, 2008, 8:14am UTC](https://www.ruby-forum.com/t/ferret-rebuild-index/196711 "2008-06-12T08:14:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![purab](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/6de8d8/32.png) [@purab](https://www.ruby-forum.com/u/purab)\
**Post date:** [June 12, 2008, 8:14am UTC](https://www.ruby-forum.com/t/ferret-rebuild-index/196711/1 "2008-06-12T08:14:26Z")

</div>

i am using ferret search engine for site search.  
but after week i need to rebuild index for ferret manually.

i am searching for, is there any automated way for creating indexes in  
ferret.

---

<div class="post-metadata">

**Author:** ![purab](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/6de8d8/32.png) [@purab](https://www.ruby-forum.com/u/purab)\
**Post date:** [June 12, 2008, 9:45am UTC](https://www.ruby-forum.com/t/ferret-rebuild-index/196711/2 "2008-06-12T09:45:52Z")

</div>

start script console  
then just type  
Model.rebuild\_index

this may give some error “stack level too deep”  
then you have to restart the server  
(happens to me all the time in this case,  
but the new index is ok anyway)

---

<div class="post-metadata">

**Author:** ![purab](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/6de8d8/32.png) [@purab](https://www.ruby-forum.com/u/purab)\
**Post date:** [June 12, 2008, 10:33am UTC](https://www.ruby-forum.com/t/ferret-rebuild-index/196711/3 "2008-06-12T10:33:55Z")

</div>

Thorsten M. wrote:

> start script console  
> then just type  
> Model.rebuild\_index
> 
> this may give some error “stack level too deep”  
> then you have to restart the server  
> (happens to me all the time in this case,  
> but the new index is ok anyway)

i know this command but i want auto mated way of creating indexes.  
i dont want to use rebuild\_index command every time
