Closed christianhellsten closed 12 years ago
Hi Christian
Can you clarify what you mean by the primary key index being missing?
Hi Pat
I meant the index on the id column. Adding the index fixes the issue, e.g.:
create unique index index_products_on_index on products(id);
The index should be there, but it can be deleted by mistake.
Huh, that's an odd one. I wouldn't expect Rails to use that to determine the primary key. If I find some time, I'll set up a test app and try to reproduce the issue. With that in mind, are you using MySQL, or PostgreSQL?
On 01/10/2011, at 5:08 PM, Christian Hellsten wrote:
Hi Pat
I meant the index on the id column. Adding the index fixes the issue, e.g.:
create unique index index_products_on_index on products(id);
The index should be there, but it can be deleted by mistake.
Reply to this email directly or view it on GitHub: https://github.com/freelancing-god/thinking-sphinx/issues/292#issuecomment-2256069
Thanks. I'm using MySQL.
Forgot to say that it fails when running ts:in or ts:conf, not when performing searches, so hopefully it should be easy to reproduce...
Patched - just defaulting to a primary key of id. Will try to get a new release out in the next 24 hours. Thanks for the debugging help :)
TS fails with the following error if the primary key index is missing on a table:
Looks like an old issue: http://groups.google.com/group/thinking-sphinx/browse_thread/thread/2431d6ca8788f478/bc67f969f344a1d7