@@ -25,21 +25,16 @@ public function __construct(
2525 /**
2626 * @param int $categoryId
2727 * @param \Shopsys\FrameworkBundle\Model\Pricing\Group\PricingGroup $pricingGroup
28- * @param string $search
2928 * @return \Shopsys\FrameworkBundle\Model\Product\Filter\ProductFilterConfigIdsData
3029 */
3130 public function getProductFilterDataInCategory (
3231 int $ categoryId ,
3332 PricingGroup $ pricingGroup ,
34- string $ search ,
3533 ): ProductFilterConfigIdsData {
3634 $ filterQuery = $ this ->filterQueryFactory ->createVisible ()
3735 ->filterOnlySellable ()
3836 ->filterByCategory ([$ categoryId ]);
3937
40- if ($ search !== '' ) {
41- $ filterQuery = $ filterQuery ->search ($ search );
42- }
4338 $ aggregationQuery = $ filterQuery
4439 ->getAggregationQueryForProductFilterConfig ($ pricingGroup ->getId ());
4540 $ aggregationResult = $ this ->client ->search ($ aggregationQuery )['aggregations ' ];
@@ -68,21 +63,16 @@ public function getProductFilterDataForSearch(
6863 /**
6964 * @param int $brandId
7065 * @param \Shopsys\FrameworkBundle\Model\Pricing\Group\PricingGroup $pricingGroup
71- * @param string $searchText
7266 * @return \Shopsys\FrameworkBundle\Model\Product\Filter\ProductFilterConfigIdsData
7367 */
7468 public function getProductFilterDataInBrand (
7569 int $ brandId ,
7670 PricingGroup $ pricingGroup ,
77- string $ searchText = '' ,
7871 ): ProductFilterConfigIdsData {
7972 $ filterQuery = $ this ->filterQueryFactory ->createVisible ()
8073 ->filterOnlySellable ()
8174 ->filterByBrands ([$ brandId ]);
8275
83- if ($ searchText !== '' ) {
84- $ filterQuery = $ filterQuery ->search ($ searchText );
85- }
8676 $ aggregationQuery = $ filterQuery
8777 ->getAggregationQueryForProductFilterConfig ($ pricingGroup ->getId ());
8878 $ aggregationResult = $ this ->client ->search ($ aggregationQuery )['aggregations ' ];
@@ -93,21 +83,16 @@ public function getProductFilterDataInBrand(
9383 /**
9484 * @param int $flagId
9585 * @param \Shopsys\FrameworkBundle\Model\Pricing\Group\PricingGroup $pricingGroup
96- * @param string $searchText
9786 * @return \Shopsys\FrameworkBundle\Model\Product\Filter\ProductFilterConfigIdsData
9887 */
9988 public function getProductFilterDataInFlag (
10089 int $ flagId ,
10190 PricingGroup $ pricingGroup ,
102- string $ searchText = '' ,
10391 ): ProductFilterConfigIdsData {
10492 $ filterQuery = $ this ->filterQueryFactory ->createVisible ()
10593 ->filterOnlySellable ()
10694 ->filterByFlags ([$ flagId ]);
10795
108- if ($ searchText !== '' ) {
109- $ filterQuery = $ filterQuery ->search ($ searchText );
110- }
11196 $ aggregationQuery = $ filterQuery
11297 ->getAggregationQueryForProductFilterConfig ($ pricingGroup ->getId ());
11398 $ aggregationResult = $ this ->client ->search ($ aggregationQuery )['aggregations ' ];
0 commit comments