# RÃ©p : ignored or forgotten valu es in reindexing

**URL:** <https://www.ruby-forum.com/t/ra-p-ignored-or-forgotten-valu-es-in-reindexing/147018>\
**Category:** Ferret\
**Created:** [August 27, 2008, 4:30pm UTC](https://www.ruby-forum.com/t/ra-p-ignored-or-forgotten-valu-es-in-reindexing/147018 "2008-08-27T16:30:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 27, 2008, 4:30pm UTC](https://www.ruby-forum.com/t/ra-p-ignored-or-forgotten-valu-es-in-reindexing/147018/1 "2008-08-27T16:30:48Z")

</div>

Hi,

Le 27 août 08 à 02:51, Chris S. a écrit :

> > 
> 
> I have seen this problem as well. Same versions of ferret/aaf  
> (0.11.6/0.4.3). Differences are Rails 2.0 and using SQL Server.

I use posgresql, didn’t mention it.

> The limited amount of investigation that I have been able to do  
> suggests a fence post error in the bulk index pagination. Of 2000+  
> objects, 2 are missing. I’m only basing the fence post conjecture on  
> the number of missing objects & the default pagination window (1000).  
> I have not even had a chance to investigate changing the window size,  
> let alone investigate deeper.

I observed this behaviour with reindexing, even from script/console,  
without any pagination interference.

Jean-Christophe M.  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 27, 2008, 6:34pm UTC](https://www.ruby-forum.com/t/ra-p-ignored-or-forgotten-valu-es-in-reindexing/147018/2 "2008-08-27T18:34:00Z")

</div>

On Wed, Aug 27, 2008 at 10:30 AM, removed\_email\_address@domain.invalid  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > The limited amount of investigation that I have been able to do  
> > suggests a fence post error in the bulk index pagination. Of 2000+  
> > objects, 2 are missing. I’m only basing the fence post conjecture on  
> > the number of missing objects & the default pagination window (1000).  
> > I have not even had a chance to investigate changing the window size,  
> > let alone investigate deeper.
> 
> I observed this behaviour with reindexing, even from script/console, without  
> any pagination interference.

Reindexing uses the BulkIndexer as well does it not? Even from  
script/console, unless I am mistaken.

-Chris

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 28, 2008, 9:26am UTC](https://www.ruby-forum.com/t/ra-p-ignored-or-forgotten-valu-es-in-reindexing/147018/3 "2008-08-28T09:26:13Z")

</div>

Hi!

I must admit that I don’t do regular testing with postgresql, maybe  
its some db related issue. I’ll look into it. Could you please open a  
ticket at [projects.jkraemer.net/acts\_as\_ferret](http://projects.jkraemer.net/acts_as_ferret) ?

cheers,  
Jens

On 27.08.2008, at 16:30, removed\_email\_address@domain.invalid wrote:

> > > some values;  
> > > The limited amount of investigation that I have been able to do  
> > > Jean-Christophe M.  
> > > removed\_email\_address@domain.invalid
> 
> * * *
> 
> Ferret-talk mailing list  
> removed\_email\_address@domain.invalid  
> [http://rubyforge.org/mailman/listinfo/ferret-talk](http://rubyforge.org/mailman/listinfo/ferret-talk)

–  
Jens Krämer  
webit! Gesellschaft für neue Medien mbH  
Schnorrstraße 76 | 01069 Dresden  
Telefon +49351467660 | Telefax +493514676666  
removed\_email\_address@domain.invalid | [www.webit.de](http://www.webit.de)

Amtsgericht Dresden | HRB 15422  
GF Sven Haubold

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 28, 2008, 10:21am UTC](https://www.ruby-forum.com/t/ra-p-ignored-or-forgotten-valu-es-in-reindexing/147018/4 "2008-08-28T10:21:53Z")

</div>

Le 28 août 08 à 09:25, Jens Krämer a écrit :

> I must admit that I don’t do regular testing with postgresql, maybe  
> its some db related issue. I’ll look into it. Could you please open  
> a ticket at [projects.jkraemer.net/acts\_as\_ferret](http://projects.jkraemer.net/acts_as_ferret) ?

Sure ! but I’d like to diagnose a bit more. How can I get some error  
output instead of silently ignored rows ?

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 29, 2008, 2:31am UTC](https://www.ruby-forum.com/t/ra-p-ignored-or-forgotten-valu-es-in-reindexing/147018/5 "2008-08-29T02:31:53Z")

</div>

Hi,

Le 28 août 08 à 09:25, Jens Krämer a écrit :

> I must admit that I don’t do regular testing with postgresql, maybe  
> its some db related issue. I’ll look into it. Could you please open  
> a ticket at [projects.jkraemer.net/acts\_as\_ferret](http://projects.jkraemer.net/acts_as_ferret) ?

Thanks for your quick reply.  
I think I found a mistake of mine with this other thread :

Le 28 août 08 à 17:19, Sheldon M. a écrit :

> Now, corrupt indexes in development is another issue. In  
> development, you are not running a DRb server. Each mongrel is  
> hitting the index directly. You typically have only one mongrel  
> running in development. But if you open an interactive script/  
> console session, and play with your models side-by-side a running  
> mongrel, you WILL corrupt your Ferret index. That’s because both  
> the mongrel and the script/console will be writers to the same  
> index, something that Ferret doesn’t support. Heck, running a rake  
> db:migrate along side a running mongrel will cause index  
> corruption, for the same reason: multiple writers.

In fact I probably had mongrel and console running together when I  
reindexed in development.  
I shut down and dropped my index dir, then did bulk\_index on my class  
in console.  
Seems all my words were indexed.

Maybe we could think to some error messages issued by each index  
writer :  
could be like  
logger.debug ‘Man, chances are you are messing up your index by  
writing concurrently to it’ if (development) && writer\_flag  
The flag being a development only feature, enabled by default,  
disabled in production only.  
What do you think of this ?
