Skip to content

Commit

Permalink
Added aggregateCompositeByQuery method signature into RepositoryInter…
Browse files Browse the repository at this point in the history
…face.
  • Loading branch information
diogocorreia-kununu committed Jul 15, 2024
1 parent ea6fa55 commit 4597e80
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/Repository/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ function() use ($query) {
);
}

/** @return Generator <CompositeResult> */
public function aggregateCompositeByQuery(CompositeAggregationQueryInterface $query): Generator
{
$afterKey = null;
Expand Down
9 changes: 9 additions & 0 deletions src/Repository/RepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

namespace Kununu\Elasticsearch\Repository;

use Generator;
use Kununu\Elasticsearch\Query\CompositeAggregationQueryInterface;
use Kununu\Elasticsearch\Query\QueryInterface;
use Kununu\Elasticsearch\Result\AggregationResultSetInterface;
use Kununu\Elasticsearch\Result\ResultIteratorInterface;
Expand Down Expand Up @@ -102,6 +104,13 @@ public function countByQuery(QueryInterface $query): int;
*/
public function aggregateByQuery(QueryInterface $query): AggregationResultSetInterface;

/**
* This method executes a query with composite aggregation, iterates through the results, and retrieves the data.
*
* @return Generator <CompositeResult>
*/
public function aggregateCompositeByQuery(CompositeAggregationQueryInterface $query): Generator;

/**
* This method updates all documents matching a given $query using a given $updateScript.
*/
Expand Down

0 comments on commit 4597e80

Please sign in to comment.