Skip to content

Releases: matchory/elasticsearch

Version 2.8.0 - Beta 1

11 May 09:35
4488303
Compare
Choose a tag to compare
Pre-release

In this release, we move to PHP 8.2, with support limited to Laravel 9 and 10. If you're still using older versions, we recommend staying on the 2.7.x release series, which we will still provide security fixes for.

Changelog

  • Feature: Switched to PHP 8.2
  • Feature: Added property types
  • Fix: Model collections would not accept collections as their input, breaking some inherited collection methods
  • Chore: Improved static typing

Full Changelog: 2.7.1...2.8.0-beta.1

Version 2.7.1

12 Apr 09:00
4cf35aa
Compare
Choose a tag to compare

Change log

  • Fix: Field names passed to the query builder would be interpreted as global functions in some cases (#277)
  • Chore: Bumped dependencies

Version 2.7.0

27 Aug 09:37
8390e21
Compare
Choose a tag to compare

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)

27 Aug 09:18
8390e21
Compare
Choose a tag to compare
Pre-release

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

09 Feb 11:54
41645d9
Compare
Choose a tag to compare

Changelog

  • Fix: Field selection would not work if fields were specified multiple times (fixes #132)
  • Chore: Bumped dependencies

Version 2.6.2

30 Nov 17:41
e4af833
Compare
Choose a tag to compare

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

16 Sep 10:31
91a9d38
Compare
Choose a tag to compare

Changelog

  • Fix: Using unselect() to exclude fields before any were included using select(), an error would occur (#84)
  • Fix: select() would add fields to the legacy key _source.include instead of _source.includes

Version 2.6.0

16 Sep 10:00
de3e616
Compare
Choose a tag to compare

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

13 Jun 09:40
3a47683
Compare
Choose a tag to compare

Changelog

  • Regression: Library would not work with Lumen due to a hard-coded Laravel dependency (#47)

Version 2.5.2 (Beta 1)

13 Jun 09:37
3a47683
Compare
Choose a tag to compare
Pre-release

Changelog

  • Regression: Library would not work with Lumen due to a hard-coded Laravel dependency (#47)