Add a tiny bit of infrastructure to make Mongo-based search work for entities.