Add search trait for using in models, refactoring.