Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
feat(ProductSearch): add fuzzy flag to product search request
Browse files Browse the repository at this point in the history
  • Loading branch information
Jens Schulze committed Sep 25, 2015
1 parent 8278313 commit 0ed8dc8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Request/Products/ProductProjectionSearchRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
namespace Commercetools\Core\Request\Products;

use Commercetools\Core\Request\ExpandTrait;
use Commercetools\Core\Request\Query\Parameter;
use Commercetools\Core\Request\QueryRequestInterface;
use Commercetools\Core\Request\SortRequestInterface;
use Psr\Http\Message\ResponseInterface;
Expand Down Expand Up @@ -134,4 +135,17 @@ public function addFacet(FilterInterface $filter)
{
return $this->filter(static::FACET, $filter);
}

/**
* @param $fuzzy
* @return $this
*/
public function fuzzy($fuzzy)
{
if (!is_null($fuzzy)) {
$this->addParamObject(new Parameter('fuzzy', (bool)$fuzzy));
}

return $this;
}
}

0 comments on commit 0ed8dc8

Please # to comment.