Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/Builder/Accumulator/AvgAccumulator.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions src/Builder/Accumulator/CountAccumulator.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions src/Builder/Accumulator/MaxAccumulator.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions src/Builder/Accumulator/MinAccumulator.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

57 changes: 57 additions & 0 deletions src/Builder/Accumulator/OutputWindowAccumulator.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions src/Builder/Accumulator/SumAccumulator.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions src/Builder/Pipeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,24 @@ public function getIterator(): ArrayIterator
{
return new ArrayIterator($this->stages);
}

/**
* Executes the pipeline locally on the provided documents.
* Only for test/local execution purposes.
*
* @param array $documents Input documents
* @return array Resulting documents after pipeline execution
*/
public function processLocally(array $documents): array
{
$result = $documents;
foreach ($this->stages as $stage) {
if (method_exists($stage, 'processLocally')) {
$result = $stage->processLocally($result);
} else {
throw new \RuntimeException('Stage does not support local execution: ' . (is_object($stage) ? get_class($stage) : gettype($stage)));
}
}
return $result;
}
}
24 changes: 24 additions & 0 deletions src/Builder/Stage/FacetStage.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 56 additions & 0 deletions src/Builder/Stage/GroupStage.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions src/Builder/Stage/LimitStage.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions src/Builder/Stage/MatchStage.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions src/Builder/Stage/ProjectStage.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading