def transform_search_hit(self, pid, record_hit, links_factory=None,
                             **kwargs):
        """Transform search result hit into an intermediate representation."""
        context = kwargs.get('marshmallow_context', {})
        context.setdefault('pid', pid)
        return self.dump(self.preprocess_search_hit(pid, record_hit,
                         links_factory=links_factory, **kwargs), context)