Releases: matchory/elasticsearch
Releases · matchory/elasticsearch
Version 2.7.0
Changelog
- Feature: Add support for reporting breadcrumbs to Sentry, if the service provider is installed and loaded. This will transparently add the Elasticsearch queries executed to traces in Sentry, should an exception occur later on during a request.
Full Changelog: 2.6.3...2.7.0
Version 2.7.0 (Beta 1)
Changelog
- Feature: Add support for reporting breadcrumbs to Sentry, if the service provider is installed and loaded. This will transparently add the Elasticsearch queries executed to traces in Sentry, should an exception occur later on during a request.
Version 2.6.3
Changelog
- Fix: Field selection would not work if fields were specified multiple times (fixes #132)
- Chore: Bumped dependencies
Version 2.6.2
Changelog
- Fix: Global model scopes would not be applied to queries (#103)
- Chore: Added Deprecation attributes to all deprecated functionality, making migration easier
- Chore: Bumped dependencies, cleaned up a little
Version 2.6.1
Changelog
- Fix: Using
unselect()
to exclude fields before any were included usingselect()
, an error would occur (#84) - Fix:
select()
would add fields to the legacy key_source.include
instead of_source.includes
Version 2.6.0
Changelog
- Feature: Added
aggregate()
method to query builder, allowing to fluently add aggregations. - Chore: Updated dependencies
Adding aggregations
From 2.6.0 onwards, you can add aggregations to your query using the fluent query builder:
$query->aggregate('color');
Specifying the name only will create a simple term query:
{
"aggs": {
"color": {
"terms": {
"field": "color"
}
}
}
Pass a string to use a different field:
$query->aggregate('color', 'color_field');
Specifying the name only will create a simple term query:
{
"aggs": {
"color": {
"terms": {
"field": "color_field"
}
}
}
To have custom aggregations, pass an array instead of the field name:
$query->aggregate('date', [
'date_histogram' => [
'field' => 'date',
'interval' => 'month'
]
]);
Specifying the name only will create a simple term query:
{
"aggs": {
"date": {
"date_histogram": {
"field": "date",
"interval": "month"
}
}
}
}
Version 2.5.2
Changelog
- Regression: Library would not work with Lumen due to a hard-coded Laravel dependency (#47)
Version 2.5.2 (Beta 1)
Changelog
- Regression: Library would not work with Lumen due to a hard-coded Laravel dependency (#47)
Version 2.5.1
Change log
- Fix: When calling
map()
on a Collection and callingtoArray()
afterwards, an exception would be thrown if the collection wasn't mapped to arrays due to a faulty return type declaration. (fixed in #32, thanks @matthenning)
Version 2.5.0
Change log
- Feature: Added support for filter shorthand methods to add filters to the query directly
- Feature: Allowed to use
filter
,must
andmust_not
with their counterparts from a custom body by merging them - Feature: Added possibility to use literal comparison operators (
eq
,gte
, etc.) in addition to standard operators - Fix: Improved URL resolution for pagination by using Laravel's request facade
- Fix: Added IDE autocompletion to pagination instances by adding a mixin annotation to
Collection