Fixed has_categories method used search class.