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);

    }
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);

    }
{@inheritdoc}

@param \Versatile\Search\Contracts\Criteria $criteria
@return \Versatile\Search\Contracts\Search