acts_as_xapian jobs table
- by Grnbeagle
Hi,
Can someone explain to me the inner workings of acts_as_xapian_jobs table?
I ran into an issue with the acts_as_xapian plugin recently, where I kept getting the following error when it creates an object with xapian indexed fields:
Mysql::Error: Duplicate entry 'String-2147483647' for key 2:
INSERT INTO `acts_as_xapian_jobs` (`action`, `model`, `model_id`)
VALUES ('update', 'String', 23730251831560)
It turns out the model_id exceeded the max int value of 2147483647. The workaround was to update model_id to use bigint. Why would the model_id be so huge? By looking at content of acts_as_xapian_jobs, it seems it creates a row for every field that is being indexed..
Understanding how a job gets created in the table would help a great deal.
Here's a sampling of the table:
mysql> select * from acts_as_xapian_jobs limit 5\G
*************************** 1. row ***************************
id: 19
model: String
model_id: 23804037900560
action: update
*************************** 2. row ***************************
id: 49
model: String
model_id: 23804037191200
action: update
*************************** 3. row ***************************
id: 79
model: String
model_id: 23804037932180
action: update
*************************** 4. row ***************************
id: 109
model: String
model_id: 23804037101700
action: update
*************************** 5. row ***************************
id: 139
model: String
model_id: 23804037722160
action: update
Thanks in advance,
Amie