To edit pages or tickets please login with username/password: aaf/aaf

Ticket #212 (closed defect: fixed)

Opened 6 months ago

Last modified 6 months ago

records_for_rebuild not fetching all records

Reported by: aaf Assigned to: jk
Priority: major Milestone:
Component: 0plugin Version:
Keywords: Cc: pedrobelo@gmail.com

Description

I added acts_as_ferret to a project with ~40k products but my index looked incomplete. In fact, Product.rebuild_index.size returned 26632.

In the log there was no error, but I noticed that some products were added twice.

So I went to the source and noticed that records_for_rebuild is only ordering rows when the adapter is SQL Server. Is there any reason for that? Removing this constraint (and thus always ordering by the primary key) worked for me, resulting in a complete index.

I'm not using fast batches but I think it has the same bug, since it's not ordering the rows.

Using postgres 8.3.0, rails 1.2.6 and acts_as_ferret from trunk (r334).

Change History

04/02/08 00:38:52 changed by aaf

Just to make it clear: using fast batches will fail too because the offset is set to the last record id, and considering there's no order this id may not be the higher one as expected.

04/02/08 00:44:07 changed by aaf

ah, just read about fast batches. I see, in this case it seems to be ok to not order, sorry.

04/12/08 05:59:41 changed by jk

  • status changed from new to closed.
  • resolution set to fixed.

Ordering by PK always now (but not with mysql/fast batches, as it will return results ordered by PK anyway).

To edit pages or tickets please login with username/password: aaf/aaf