Skip to content

Releases: pdphilip/laravel-elasticsearch

v4.0.4

17 Aug 21:15
Compare
Choose a tag to compare

This unified release includes updates for multiple Laravel versions:


Upgrades

  • sum(), avg(), min() and max() can now process multiple fields in one call
Product::where('color','blue')->avg(['orders', 'price']);
//Previously required two separate calls:
Product::where('color','blue')->avg('orders');
Product::where('color','blue')->avg('price');
  • rawSearch(array $bodyParams, bool $returnRaw = false)
  • a second bool parameter will return data as is (unsanitized) if set to true
Product::rawSearch($body, true);

Bug fixes

  • rawAggregation with multiple aggregations now returns all aggs
  • Fixed issue when saving fields where the data didn't change threw an error

Full Changelog: v4.0.3...v4.0.4

v4.0.3 - (Unified with v3.9.3 & v3.8.3)

01 Aug 10:00
Compare
Choose a tag to compare

This unified release includes updates for multiple Laravel versions:

New Features

wherePhrasePrefix($field, $phraseWithPrefix)

Method for looking up a specific sequence of words where the last word starts with a particular prefix

Person::wherePhrasePrefix('description', 'loves es')->get();
// returns: loves espresso, loves essays, loves eskimos, etc

Docs: https://elasticsearch.pdphilip.com/es-specific#where-phrase-prefix

phrase($field)

Method for searching across multiple fields for a specific phrase (sequence of words in order)

Book::phrase('United States')->orPhrase('United Kingdom')->search();
// Search for books that contain either 'United States' or 'United Kingdom', phrases like 'United Emirates' will not be included.

Docs: https://elasticsearch.pdphilip.com/full-text-search#phrase-search-phrase

agg(array $functions,$field)

Optimization method that allows you to call multiple aggregation functions on a single field in one call.
Available aggregation functions: count, avg, min, max, sum, matrix.

Product::where('is_active',true)->agg(['count','avg','min','max','sum'],'sales');

https://elasticsearch.pdphilip.com/aggregation#grouped-aggregations

toDsl() (or toSql())

Returns the parsed DSL query from the query builder

Product::whereIn('color', ['red', 'green'])->orderByDesc('sales')->toDsl();

Returns

{
  "index": "products",
  "body": {
    "query": {
      "terms": {
        "color.keyword": [
          "red",
          "green"
        ]
      }
    },
    "_source": [
      "*"
    ],
    "sort": [
      {
        "sales": {
          "order": "desc"
        }
      }
    ]
  }
}

Docs: https://elasticsearch.pdphilip.com/es-specific#to-dsl

Tests for new features: https://github.com/pdphilip/laravel-elasticsearch-tests/blob/main/tests/EloquentTests/Update24-01Test.php


Bug fixes

  • unset _meta on save. by @use-the-fork in #30
  • Now throws an explicit error when trying to use BelongsToMany() which is not supported (but can be worked around easily)

Upgrades

  • Fixed error tracking index for writing ES errors to a dedicated index
// database.php
'elasticsearch' => [
  'driver'          => 'elasticsearch',
  //......
  //......
  //......
  'error_log_index' => env('ES_ERROR_INDEX', false),
],
  • White space code clean-up

New Contributors

Full Changelog: v4.0.2...v4.0.3

v4.0.2

06 Jun 13:10
Compare
Choose a tag to compare

New Features

  • Add double numeric support to IndexBlueprint by @danneker in #28

New numeric type mappings for IndexBlueprint

  • double($field) - A double-precision 64-bit IEEE 754 floating point number, restricted to finite values.
  • byte($field) - A signed 8-bit integer with a minimum value of -128 and a maximum value of 127.
  • halfFloat($field) - A half-precision 16-bit IEEE 754 floating point number, restricted to finite values.
  • scaledFloat($field, $scalingFactor = 100) - A floating point number that is backed by a long, scaled by a fixed double scaling factor.
  • unsignedLong($field) - An unsigned 64-bit integer with a minimum value of 0 and a maximum value of 264-1.

Example:

  Schema::create('my_index', function (IndexBlueprint $index) {
      $index->double('some_field_a');
      $index->byte('some_field_b');
      $index->halfFloat('some_field_c');
      $index->scaledFloat('some_field_d', 100);
      $index->unsignedLong('some_field_e');
  });

Upgrades

  • Upgraded Connection class to parse the config's connection name. This allows for multiple connections or if you define your connection in the database file something other than elasticsearch

Example with multiple connections (database.php):

 'elasticsearch'       => [
    'driver'       => 'elasticsearch',
    'auth_type'    => env('ES_AUTH_TYPE', 'http'), //http, cloud or api
    'hosts'        => explode(',', env('ES_HOSTS', 'http://localhost:9200')),
    'username'     => env('ES_USERNAME', ''),
    'password'     => env('ES_PASSWORD', ''),
    'cloud_id'     => env('ES_CLOUD_ID', ''),
    'api_id'       => env('ES_API_ID', ''),
    'api_key'      => env('ES_API_KEY', ''),
    'ssl_cert'     => env('ES_SSL_CA', ''),
    'ssl'          => [
        'cert'          => env('ES_SSL_CERT', ''),
        'cert_password' => env('ES_SSL_CERT_PASSWORD', ''),
        'key'           => env('ES_SSL_KEY', ''),
        'key_password'  => env('ES_SSL_KEY_PASSWORD', ''),
    ],
    'index_prefix' => env('ES_INDEX_PREFIX', false),
    'options'      => [
        'allow_id_sort'    => env('ES_OPT_ID_SORTABLE', false),
        'ssl_verification' => env('ES_OPT_VERIFY_SSL', true),
        'retires'          => env('ES_OPT_RETRIES', null),
        'meta_header'      => env('ES_OPT_META_HEADERS', true),
    ],
    'query_log'    => [
        'index'      => false,
        'error_only' => true,
    ],
],
'elasticsearch-cloud' => [
    'driver'       => 'elasticsearch',
    'auth_type'    => env('ES_CLOUD_AUTH_TYPE', 'http'), //http or cloud
    'hosts'        => explode(',', env('ES_CLOUD_HOSTS', 'http://localhost:9200')),
    'username'     => env('ES_CLOUD_USERNAME', ''),
    'password'     => env('ES_CLOUD_PASSWORD', ''),
    'cloud_id'     => env('ES_CLOUD_CLOUD_ID', ''),
    'api_id'       => env('ES_CLOUD_API_ID', ''),
    'api_key'      => env('ES_CLOUD_API_KEY', ''),
    'ssl_cert'     => env('ES_CLOUD_SSL_CA', ''),
    'ssl'          => [
        'cert'          => env('ES_CLOUD_SSL_CERT', ''),
        'cert_password' => env('ES_CLOUD_SSL_CERT_PASSWORD', ''),
        'key'           => env('ES_CLOUD_SSL_KEY', ''),
        'key_password'  => env('ES_CLOUD_SSL_KEY_PASSWORD', ''),
    ],
    'index_prefix' => env('ES_CLOUD_INDEX_PREFIX', false),
    'options'      => [
        'allow_id_sort'    => env('ES_CLOUD_OPT_ID_SORTABLE', false),
        'ssl_verification' => env('ES_CLOUD_OPT_VERIFY_SSL', true),
        'retires'          => env('ES_CLOUD_OPT_RETRIES', null),
        'meta_header'      => env('ES_CLOUD_OPT_META_HEADERS', true),
    ],
    'query_log'    => [
        'index'      => false,
        'error_only' => true,
    ],
],

Examples of selecting connection:

Schema::on('elasticsearch-cloud')->create('my_index', ...... );
Product::on('elasticsearch-cloud')->get() //If $connection in Product model is not 'elasticsearch-cloud';

New Contributors

Full Changelog: v4.0.1...v4.0.2

v3.9.2

06 Jun 13:09
Compare
Choose a tag to compare

New Features

New numeric type mappings for IndexBlueprint

  • double($field) - A double-precision 64-bit IEEE 754 floating point number, restricted to finite values.
  • byte($field) - A signed 8-bit integer with a minimum value of -128 and a maximum value of 127.
  • halfFloat($field) - A half-precision 16-bit IEEE 754 floating point number, restricted to finite values.
  • scaledFloat($field, $scalingFactor = 100) - A floating point number that is backed by a long, scaled by a fixed double scaling factor.
  • unsignedLong($field) - An unsigned 64-bit integer with a minimum value of 0 and a maximum value of 264-1.

Example:

  Schema::create('my_index', function (IndexBlueprint $index) {
      $index->double('some_field_a');
      $index->byte('some_field_b');
      $index->halfFloat('some_field_c');
      $index->scaledFloat('some_field_d', 100);
      $index->unsignedLong('some_field_e');
  });

Upgrades

  • Upgraded Connection class to parse the config's connection name. This allows for multiple connections or if you define your connection in the database file something other than elasticsearch

Example with multiple connections (database.php):

 'elasticsearch'       => [
    'driver'       => 'elasticsearch',
    'auth_type'    => env('ES_AUTH_TYPE', 'http'), //http, cloud or api
    'hosts'        => explode(',', env('ES_HOSTS', 'http://localhost:9200')),
    'username'     => env('ES_USERNAME', ''),
    'password'     => env('ES_PASSWORD', ''),
    'cloud_id'     => env('ES_CLOUD_ID', ''),
    'api_id'       => env('ES_API_ID', ''),
    'api_key'      => env('ES_API_KEY', ''),
    'ssl_cert'     => env('ES_SSL_CA', ''),
    'ssl'          => [
        'cert'          => env('ES_SSL_CERT', ''),
        'cert_password' => env('ES_SSL_CERT_PASSWORD', ''),
        'key'           => env('ES_SSL_KEY', ''),
        'key_password'  => env('ES_SSL_KEY_PASSWORD', ''),
    ],
    'index_prefix' => env('ES_INDEX_PREFIX', false),
    'options'      => [
        'allow_id_sort'    => env('ES_OPT_ID_SORTABLE', false),
        'ssl_verification' => env('ES_OPT_VERIFY_SSL', true),
        'retires'          => env('ES_OPT_RETRIES', null),
        'meta_header'      => env('ES_OPT_META_HEADERS', true),
    ],
    'query_log'    => [
        'index'      => false,
        'error_only' => true,
    ],
],
'elasticsearch-cloud' => [
    'driver'       => 'elasticsearch',
    'auth_type'    => env('ES_CLOUD_AUTH_TYPE', 'http'), //http or cloud
    'hosts'        => explode(',', env('ES_CLOUD_HOSTS', 'http://localhost:9200')),
    'username'     => env('ES_CLOUD_USERNAME', ''),
    'password'     => env('ES_CLOUD_PASSWORD', ''),
    'cloud_id'     => env('ES_CLOUD_CLOUD_ID', ''),
    'api_id'       => env('ES_CLOUD_API_ID', ''),
    'api_key'      => env('ES_CLOUD_API_KEY', ''),
    'ssl_cert'     => env('ES_CLOUD_SSL_CA', ''),
    'ssl'          => [
        'cert'          => env('ES_CLOUD_SSL_CERT', ''),
        'cert_password' => env('ES_CLOUD_SSL_CERT_PASSWORD', ''),
        'key'           => env('ES_CLOUD_SSL_KEY', ''),
        'key_password'  => env('ES_CLOUD_SSL_KEY_PASSWORD', ''),
    ],
    'index_prefix' => env('ES_CLOUD_INDEX_PREFIX', false),
    'options'      => [
        'allow_id_sort'    => env('ES_CLOUD_OPT_ID_SORTABLE', false),
        'ssl_verification' => env('ES_CLOUD_OPT_VERIFY_SSL', true),
        'retires'          => env('ES_CLOUD_OPT_RETRIES', null),
        'meta_header'      => env('ES_CLOUD_OPT_META_HEADERS', true),
    ],
    'query_log'    => [
        'index'      => false,
        'error_only' => true,
    ],
],

Examples of selecting connection:

Schema::on('elasticsearch-cloud')->create('my_index', ...... );
Product::on('elasticsearch-cloud')->get() //If $connection in Product model is not 'elasticsearch-cloud';

v3.8.2

06 Jun 13:09
Compare
Choose a tag to compare

New Features

New numeric type mappings for IndexBlueprint

  • double($field) - A double-precision 64-bit IEEE 754 floating point number, restricted to finite values.
  • byte($field) - A signed 8-bit integer with a minimum value of -128 and a maximum value of 127.
  • halfFloat($field) - A half-precision 16-bit IEEE 754 floating point number, restricted to finite values.
  • scaledFloat($field, $scalingFactor = 100) - A floating point number that is backed by a long, scaled by a fixed double scaling factor.
  • unsignedLong($field) - An unsigned 64-bit integer with a minimum value of 0 and a maximum value of 264-1.

Example:

  Schema::create('my_index', function (IndexBlueprint $index) {
      $index->double('some_field_a');
      $index->byte('some_field_b');
      $index->halfFloat('some_field_c');
      $index->scaledFloat('some_field_d', 100);
      $index->unsignedLong('some_field_e');
  });

Upgrades

  • Upgraded Connection class to parse the config's connection name. This allows for multiple connections or if you define your connection in the database file something other than elasticsearch

Example with multiple connections (database.php):

 'elasticsearch'       => [
    'driver'       => 'elasticsearch',
    'auth_type'    => env('ES_AUTH_TYPE', 'http'), //http, cloud or api
    'hosts'        => explode(',', env('ES_HOSTS', 'http://localhost:9200')),
    'username'     => env('ES_USERNAME', ''),
    'password'     => env('ES_PASSWORD', ''),
    'cloud_id'     => env('ES_CLOUD_ID', ''),
    'api_id'       => env('ES_API_ID', ''),
    'api_key'      => env('ES_API_KEY', ''),
    'ssl_cert'     => env('ES_SSL_CA', ''),
    'ssl'          => [
        'cert'          => env('ES_SSL_CERT', ''),
        'cert_password' => env('ES_SSL_CERT_PASSWORD', ''),
        'key'           => env('ES_SSL_KEY', ''),
        'key_password'  => env('ES_SSL_KEY_PASSWORD', ''),
    ],
    'index_prefix' => env('ES_INDEX_PREFIX', false),
    'options'      => [
        'allow_id_sort'    => env('ES_OPT_ID_SORTABLE', false),
        'ssl_verification' => env('ES_OPT_VERIFY_SSL', true),
        'retires'          => env('ES_OPT_RETRIES', null),
        'meta_header'      => env('ES_OPT_META_HEADERS', true),
    ],
    'query_log'    => [
        'index'      => false,
        'error_only' => true,
    ],
],
'elasticsearch-cloud' => [
    'driver'       => 'elasticsearch',
    'auth_type'    => env('ES_CLOUD_AUTH_TYPE', 'http'), //http or cloud
    'hosts'        => explode(',', env('ES_CLOUD_HOSTS', 'http://localhost:9200')),
    'username'     => env('ES_CLOUD_USERNAME', ''),
    'password'     => env('ES_CLOUD_PASSWORD', ''),
    'cloud_id'     => env('ES_CLOUD_CLOUD_ID', ''),
    'api_id'       => env('ES_CLOUD_API_ID', ''),
    'api_key'      => env('ES_CLOUD_API_KEY', ''),
    'ssl_cert'     => env('ES_CLOUD_SSL_CA', ''),
    'ssl'          => [
        'cert'          => env('ES_CLOUD_SSL_CERT', ''),
        'cert_password' => env('ES_CLOUD_SSL_CERT_PASSWORD', ''),
        'key'           => env('ES_CLOUD_SSL_KEY', ''),
        'key_password'  => env('ES_CLOUD_SSL_KEY_PASSWORD', ''),
    ],
    'index_prefix' => env('ES_CLOUD_INDEX_PREFIX', false),
    'options'      => [
        'allow_id_sort'    => env('ES_CLOUD_OPT_ID_SORTABLE', false),
        'ssl_verification' => env('ES_CLOUD_OPT_VERIFY_SSL', true),
        'retires'          => env('ES_CLOUD_OPT_RETRIES', null),
        'meta_header'      => env('ES_CLOUD_OPT_META_HEADERS', true),
    ],
    'query_log'    => [
        'index'      => false,
        'error_only' => true,
    ],
],

Examples of selecting connection:

Schema::on('elasticsearch-cloud')->create('my_index', ...... );
Product::on('elasticsearch-cloud')->get() //If $connection in Product model is not 'elasticsearch-cloud';

v4.0.1

29 Apr 22:01
Compare
Choose a tag to compare

Laravel 10 & 11

This Release is for both Laravel 10 and 11 users, require:

"pdphilip/elasticsearch": "^4.0"

New Features

  • highlight() - This package now dials into Elaticsearch's highlight feature - docs
  • whereTimestamp() - convenience clause to help sanitize timestamp values - docs - issue #22
  • rawAggregation() - similar to rawSearch(), passing in aggregation DSL queries will be processed and formatted- docs - issue #24

Upgrades

  • Improved error handling with readable messages and method for full data docs
  • Chunking rebuilt around Elasticseach PIT (Point in time) API docs - issue #23
  • Models have a built-in method for returning a query's metadata - docs
  • Connection upgrades to allow more options
    • Set Verify SSL
    • Set Retries
    • Set ES Meta headers override
    • Sorting by _id disabled by default. The package will now remove any clauses that include _id sorting.

Update your databse.php to fit the new config features:

'elasticsearch' => [
    'driver'       => 'elasticsearch',
    'auth_type'    => env('ES_AUTH_TYPE', 'http'), //http or cloud
    'hosts'        => explode(',', env('ES_HOSTS', 'http://localhost:9200')),
    'username'     => env('ES_USERNAME', ''),
    'password'     => env('ES_PASSWORD', ''),
    'cloud_id'     => env('ES_CLOUD_ID', ''),
    'api_id'       => env('ES_API_ID', ''),
    'api_key'      => env('ES_API_KEY', ''),
    'ssl_cert'     => env('ES_SSL_CA', ''),
    'ssl'          => [
        'cert'          => env('ES_SSL_CERT', ''),
        'cert_password' => env('ES_SSL_CERT_PASSWORD', ''),
        'key'           => env('ES_SSL_KEY', ''),
        'key_password'  => env('ES_SSL_KEY_PASSWORD', ''),
    ],
    'index_prefix' => env('ES_INDEX_PREFIX', false),
    'options'      => [
        'allow_id_sort'    => env('ES_OPT_ID_SORTABLE', false),
        'ssl_verification' => env('ES_OPT_VERIFY_SSL', true),
        'retires'          => env('ES_OPT_RETRIES', null),
        'meta_header'      => env('ES_OPT_META_HEADERS', true),
    ],
    'query_log'    => [
        'index'      => false, //Or provide a name for the logging index ex: 'laravel_query_logs'
        'error_only' => true, //If false, then all queries are logged if the query_log index is set
    ],
],

Bug fixes

  • Failed calls trigger a connection rebuild to counter cached failed connections via job queues - issue #27
  • Return type error for index_prefixes to allow for null
  • Allow for API key in local connection config

Full Changelog: v3.11.0...v4.0.1

v3.9.1

29 Apr 21:49
Compare
Choose a tag to compare

Laravel 9 Users

New Features

  • highlight() - This package now dials into Elaticsearch's highlight feature - docs
  • whereTimestamp() - convenience clause to help sanitize timestamp values - docs
  • rawAggregation() - similar to rawSearch(), passing in aggregation DSL queries will be processed and formatted- docs

Upgrades

  • Improved error handling with readable messages and method for full data docs
  • Chunking rebuilt around Elasticseach PIT (Point in time) API docs
  • Models have a built-in method for returning a query's metadata - docs
  • Connection upgrades to allow more options
    • Set Verify SSL
    • Set Retries
    • Set ES Meta headers override
    • Sorting by _id disabled by default. The package will now remove any clauses that include _id sorting.

Update your databse.php to fit the new config features:

'elasticsearch' => [
    'driver'       => 'elasticsearch',
    'auth_type'    => env('ES_AUTH_TYPE', 'http'), //http or cloud
    'hosts'        => explode(',', env('ES_HOSTS', 'http://localhost:9200')),
    'username'     => env('ES_USERNAME', ''),
    'password'     => env('ES_PASSWORD', ''),
    'cloud_id'     => env('ES_CLOUD_ID', ''),
    'api_id'       => env('ES_API_ID', ''),
    'api_key'      => env('ES_API_KEY', ''),
    'ssl_cert'     => env('ES_SSL_CA', ''),
    'ssl'          => [
        'cert'          => env('ES_SSL_CERT', ''),
        'cert_password' => env('ES_SSL_CERT_PASSWORD', ''),
        'key'           => env('ES_SSL_KEY', ''),
        'key_password'  => env('ES_SSL_KEY_PASSWORD', ''),
    ],
    'index_prefix' => env('ES_INDEX_PREFIX', false),
    'options'      => [
        'allow_id_sort'    => env('ES_OPT_ID_SORTABLE', false),
        'ssl_verification' => env('ES_OPT_VERIFY_SSL', true),
        'retires'          => env('ES_OPT_RETRIES', null),
        'meta_header'      => env('ES_OPT_META_HEADERS', true),
    ],
    'query_log'    => [
        'index'      => false, //Or provide a name for the logging index ex: 'laravel_query_logs'
        'error_only' => true, //If false, then all queries are logged if the query_log index is set
    ],
],

Full Changelog: v3.9.0...v3.9.1

v3.8.1

29 Apr 21:48
Compare
Choose a tag to compare

Laravel 8 Users

New Features

  • highlight() - This package now dials into Elaticsearch's highlight feature - docs
  • whereTimestamp() - convenience clause to help sanitize timestamp values - docs
  • rawAggregation() - similar to rawSearch(), passing in aggregation DSL queries will be processed and formatted- docs

Upgrades

  • Improved error handling with readable messages and method for full data docs
  • Chunking rebuilt around Elasticseach PIT (Point in time) API docs
  • Models have a built-in method for returning a query's metadata - docs
  • Connection upgrades to allow more options
    • Set Verify SSL
    • Set Retries
    • Set ES Meta headers override
    • Sorting by _id disabled by default. The package will now remove any clauses that include _id sorting.

Update your databse.php to fit the new config features:

'elasticsearch' => [
    'driver'       => 'elasticsearch',
    'auth_type'    => env('ES_AUTH_TYPE', 'http'), //http or cloud
    'hosts'        => explode(',', env('ES_HOSTS', 'http://localhost:9200')),
    'username'     => env('ES_USERNAME', ''),
    'password'     => env('ES_PASSWORD', ''),
    'cloud_id'     => env('ES_CLOUD_ID', ''),
    'api_id'       => env('ES_API_ID', ''),
    'api_key'      => env('ES_API_KEY', ''),
    'ssl_cert'     => env('ES_SSL_CA', ''),
    'ssl'          => [
        'cert'          => env('ES_SSL_CERT', ''),
        'cert_password' => env('ES_SSL_CERT_PASSWORD', ''),
        'key'           => env('ES_SSL_KEY', ''),
        'key_password'  => env('ES_SSL_KEY_PASSWORD', ''),
    ],
    'index_prefix' => env('ES_INDEX_PREFIX', false),
    'options'      => [
        'allow_id_sort'    => env('ES_OPT_ID_SORTABLE', false),
        'ssl_verification' => env('ES_OPT_VERIFY_SSL', true),
        'retires'          => env('ES_OPT_RETRIES', null),
        'meta_header'      => env('ES_OPT_META_HEADERS', true),
    ],
    'query_log'    => [
        'index'      => false, //Or provide a name for the logging index ex: 'laravel_query_logs'
        'error_only' => true, //If false, then all queries are logged if the query_log index is set
    ],
],

Full Changelog: v3.8.0...v3.8.1

v3.11.0

25 Mar 19:19
985b64a
Compare
Choose a tag to compare

Version 3

This major version brings a host of powerful enhancements and a significant architectural overhaul to the core query engine, transforming the way Elasticsearch queries are integrated and executed within Laravel applications.

Highlights:

Documentation

Given the expansion of this package, the documentation has moved to a dedicated site.

Core Engine Overhaul:

The centerpiece of this update, the query engine, has been completely rebuilt. This transformation shifts away from reliance on query strings to a direct integration with Elasticsearch's DSL (Domain Specific Language), unlocking a broader range of querying capabilities and a more profound integration with Elasticsearch's advanced features.

Nested Queries and Sorting:

  • Nested Object Queries: Deep dive into your nested data structures with comprehensive querying support.
  • Order By Nested: Enhanced sorting capabilities allow you to order search results based on fields within nested objects.
  • Filter Nested Values: Apply query filters to nested data elements returning the desired matches for the data in a nested field.

New where type clauses:

  • Phrase Matching: Boost your search precision with enhanced phrase matching, enabling the targeting of exact sequences within text fields.
  • Exact Matching: Strengthen your search with improved exact matching capabilities, ensuring only documents that exactly match specified criteria are retrieved.

Sorting Enhancements:

  • Advanced Sorting Features: Leverage Elasticsearch's native sorting features, including various sorting modes and handling of missing values.
  • Geo-Distance Sorting: Sort data with geographical considerations, enabling spatially-aware application features.

Saving Enhancements:

Grouped Queries: Build complex queries more intuitively with the new grouped query functionality, allowing for nested conditionals within a single, organized query block.

Future-Ready Architecture

Version 3 not only enhances current functionalities but also lays a solid foundation for future expansion, especially in adopting more Elasticsearch-specific features. As Elasticsearch continues to evolve, this package is designed to adapt and incorporate new capabilities, ensuring that Laravel developers have access to the forefront of search technology.

Bug fixes

  • Ordering on multiple fields #18
  • whereIn() clause uses exact values #17

v3.10.0

25 Mar 19:14
Compare
Choose a tag to compare

Version 3

This tag (3.10.x) is for:

  • Laravel 10
  • Elasticsearch 8.12

This major version brings a host of powerful enhancements and a significant architectural overhaul to the core query engine, transforming the way Elasticsearch queries are integrated and executed within Laravel applications.

Highlights:

Documentation

Given the expansion of this package, the documentation has moved to a dedicated site.

Core Engine Overhaul:

The centerpiece of this update, the query engine, has been completely rebuilt. This transformation shifts away from reliance on query strings to a direct integration with Elasticsearch's DSL (Domain Specific Language), unlocking a broader range of querying capabilities and a more profound integration with Elasticsearch's advanced features.

Nested Queries and Sorting:

  • Nested Object Queries: Deep dive into your nested data structures with comprehensive querying support.
  • Order By Nested: Enhanced sorting capabilities allow you to order search results based on fields within nested objects.
  • Filter Nested Values: Apply query filters to nested data elements returning the desired matches for the data in a nested field.

New where type clauses:

  • Phrase Matching: Boost your search precision with enhanced phrase matching, enabling the targeting of exact sequences within text fields.
  • Exact Matching: Strengthen your search with improved exact matching capabilities, ensuring only documents that exactly match specified criteria are retrieved.

Sorting Enhancements:

  • Advanced Sorting Features: Leverage Elasticsearch's native sorting features, including various sorting modes and handling of missing values.
  • Geo-Distance Sorting: Sort data with geographical considerations, enabling spatially-aware application features.

Saving Enhancements:

Grouped Queries: Build complex queries more intuitively with the new grouped query functionality, allowing for nested conditionals within a single, organized query block.

Future-Ready Architecture

Version 3 not only enhances current functionalities but also lays a solid foundation for future expansion, especially in adopting more Elasticsearch-specific features. As Elasticsearch continues to evolve, this package is designed to adapt and incorporate new capabilities, ensuring that Laravel developers have access to the forefront of search technology.

Bug fixes

  • Ordering on multiple fields
  • whereIn() clause uses exact values