Skip to content

Commit

Permalink
Add comment explaining search logic
Browse files Browse the repository at this point in the history
  • Loading branch information
eronisko committed Aug 16, 2023
1 parent 6b54d00 commit d7ead0d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/Http/Controllers/Api/V1/ItemController.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ public function aggregations(Request $request)
}

// Add filter terms to each aggregation
// Based on https://madewithlove.com/blog/faceted-search-using-elasticsearch/
foreach (array_keys($aggregationsQuery) as $term) {
$aggregationsQuery[$term]['filter'] = $this->createQueryBuilder(
$q,
Expand Down

0 comments on commit d7ead0d

Please sign in to comment.