factor out common search repo functionality into AppController