getType() === ISearchComparison::COMPARE_IN && count($operator->getValue()) > 1000 ) { $chunks = array_chunk($operator->getValue(), 1000); $chunkComparisons = array_map(function (array $values) use ($operator) { return new SearchComparison(ISearchComparison::COMPARE_IN, $operator->getField(), $values); }, $chunks); $operator = new SearchBinaryOperator(ISearchBinaryOperator::OPERATOR_OR, $chunkComparisons); return true; } parent::processOperator($operator); return false; } }