getSearchQuery() 공개 메소드

Build the query for a condition.
public getSearchQuery ( Product $productCondition ) : Smile\ElasticsuiteCore\Search\Request\QueryInterface
$productCondition Smile\ElasticsuiteCatalogRule\Model\Rule\Condition\Product Product condition.
리턴 Smile\ElasticsuiteCore\Search\Request\QueryInterface
예제 #1
0
 /**
  * Transform a category in query rule.
  *
  * @param CategoryInterface $category Category.
  *
  * @return QueryInterface
  */
 private function getStandardCategoryQuery(CategoryInterface $category)
 {
     $conditionsParams = ['data' => ['attribute' => 'category_ids', 'operator' => '()', 'value' => $category->getId()]];
     $categoryCondition = $this->productConditionsFactory->create($conditionsParams);
     return $this->queryBuilder->getSearchQuery($categoryCondition);
 }
예제 #2
0
 /**
  * Build a search query for the current rule.
  *
  * @return \Smile\ElasticsuiteCore\Search\Request\QueryInterface
  */
 public function getSearchQuery()
 {
     return $this->queryBuilder->getSearchQuery($this);
 }