'field' => 'height', 'type' => 'range', 'parameters' =>
[RangeFilter::GTE =>
$faker->
numberBetween(1, 1000
)]],
['field' => 'width', 'type' => 'range', 'parameters' =>
[RangeFilter::GTE =>
$faker->
numberBetween(1, 1000
)]],
['field' => 'weight', 'type' => 'range', 'parameters' =>
[RangeFilter::GTE =>
$faker->
numberBetween(1, 1000
)]],
['field' => 'height', 'type' => 'range', 'parameters' =>
[RangeFilter::LTE =>
$faker->
numberBetween(1, 1000
)]],
['field' => 'width', 'type' => 'range', 'parameters' =>
[RangeFilter::LTE =>
$faker->
numberBetween(1, 1000
)]],
['field' => 'weight', 'type' => 'range', 'parameters' =>
[RangeFilter::LTE =>
$faker->
numberBetween(1, 1000
)]],
['field' => 'height', 'type' => 'range', 'parameters' =>
[RangeFilter::GT =>
$faker->
numberBetween(1, 500
), RangeFilter::LT =>
$faker->
numberBetween(500, 1000
)]],
['field' => 'width', 'type' => 'range', 'parameters' =>
[RangeFilter::GT =>
$faker->
numberBetween(1, 500
), RangeFilter::LT =>
$faker->
numberBetween(500, 1000
)]],
['field' => 'weight', 'type' => 'range', 'parameters' =>
[RangeFilter::GT =>
$faker->
numberBetween(1, 500
), RangeFilter::LT =>
$faker->
numberBetween(500, 1000
)]],
['field' => 'stock', 'type' => 'equals', 'value' => '1000'
],
['field' => 'name', 'type' => 'contains', 'value' => 'Awesome'
],
['field' => 'categoriesRo.id', 'type' => 'equalsAny', 'value' =>
implode('|',
[$context->
getRandomId('category'
),
$context->
getRandomId('category'
)])],
['field' => 'id', 'type' => 'equalsAny', 'value' =>
implode('|',
[$context->
getRandomId('product'
),
$context->
getRandomId('product'
)])],
['field' => 'manufacturerId', 'type' => 'equals', 'value' =>
$context->
getRandomId('product_manufacturer'
)],
];
$pool[] =
['type' => 'multi', 'operator' => 'AND', 'queries' =>
[$faker->
randomElement($pool),
$faker->
randomElement($pool)]];
$pool[] =
['type' => 'multi', 'operator' => 'OR', 'queries' =>
[$faker->
randomElement($pool),
$faker->
randomElement($pool)]];
$payload =
[];
for ($i = 0;
$i <
$numberOfItems; ++
$i) { $filters =
[];