Fix problems with the keyindex for the extended search

Resolved a undefined is not an object. The Messagekey has its own model class.