jeroen-g/explorer
Laravel-friendly wrapper for Explorer, a lightweight full-text search engine. Index and search your Eloquent models with simple configuration, fast queries, and flexible ranking/filters. Ideal for adding on-site search without running Elasticsearch or Algolia.
Aggregations are part of your search query and can summarise your data. You can read more about aggregations in Elasticsearch in the official documentation. At this moment not all aggregation types are build in, but creating the missing ones should be doable (and these additions to the package are very welcome).
Adding aggregations makes your search query more advanced. Here is an example from the demo application:
$search = Cartographer::search();
$search->aggregation('places', new TermsAggregation('place'));
$results = $search->raw();
$aggregations = $results->aggregations();
This will return an array of metrics on how many times every place is present in the Elasticsearch index.
How can I help you explore Laravel packages today?