ADDED: Search functions for orm and elastic search