jeroen-g/explorer
Laravel-friendly, fluent API for exploring and filtering directories and files. Chain common queries (name, extension, size, modified time), include/exclude patterns, sort and paginate results, and iterate over matches with clean, expressive code.
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?