I’ve witnessed a very strange error today.
What was going on?
I hunted around for a while but checked the contents of the index. Strangely, it had a whole page indexed. After investigating further: it’s another object in the portal with the same id as the attribute on the content-type. The error happens only, if the attribute is missing on the content-type and an object in the hirarchy above has the name id.
So – if you encounter a problem like this, check if the portal_catalog may grab a different object for indexing with the same name of your attribute.