code: public function search(CriteriaContract $criteria)
      {
  
          if (!$factory = $this->nearestForClass($criteria->modelClass())) {
              throw new OutOfBoundsException('No factory for ' . $criteria->modelClass() . ' found');
          }
  
          return call_user_func($factory, $criteria);
  
      }
docs: {@inheritdoc}
  
  @param \Versatile\Search\Contracts\Criteria $criteria
  @return \Versatile\Search\Contracts\Search