Update the search model

The search model now uses the relations to search in their attributes.