Skip to content

Commit fa763d0

Browse files
pdphilipgithub-actions[bot]
authored andcommitted
Update CHANGELOG
1 parent 465102a commit fa763d0

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

CHANGELOG.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,48 @@
22

33
All notable changes to this `laravel-elasticsearch` package will be documented in this file.
44

5+
## v5.2.0 - 2025-10-24
6+
7+
This release is compatible with Laravel 10, 11 & 12
8+
9+
### New Feature: Query String Queries
10+
11+
This release introduces Query String Queries, bringing full Elasticsearch `query_string` syntax support directly into your Eloquent-style queries.
12+
13+
- Method: `searchQueryString(query, $fields = null, $options = [])` and related methods (`orSearchQueryString`, `searchNotQueryString`, etc.)
14+
- Supports all `query_string` features — logical operators, wildcards, fuzziness, ranges, regex, boosting, field scoping, and more
15+
- Includes a dedicated `QueryStringOptions` class for fluent option configuration or array-based parameters
16+
- [See Tests](https://github.com/pdphilip/laravel-elasticsearch/blob/main/tests/QueryStringTest.php)
17+
- [Full documentation](https://elasticsearch.pdphilip.com/eloquent/query-string-queries/)
18+
19+
Example:
20+
21+
```php
22+
Product::searchQueryString('status:(active OR pending) name:(full text search)^2')->get();
23+
Product::searchQueryString('price:[5 TO 19}')->get();
24+
25+
// vanilla optional, +pizza required, -ice forbidden
26+
Product::searchQueryString('vanilla +pizza -ice', function (QueryStringOptions $options) {
27+
$options->type('cross_fields')->fuzziness(2);
28+
})->get();
29+
30+
//etc
31+
32+
```
33+
### Ordering enhancement: unmapped_type
34+
35+
- You can now add an `unmapped_type` flag to your ordering query #88
36+
37+
```php
38+
Product::query()->orderBy('name', 'desc', ['unmapped_type' => 'keyword'])->get();
39+
40+
```
41+
### Bugfix
42+
43+
- Fixed issue where limit values were being reset on bucket aggregations #84
44+
45+
**Full Changelog**: https://github.com/pdphilip/laravel-elasticsearch/compare/v5.1.0...v5.2.0
46+
547
## v5.1.0 - 2025-08-20
648

749
This release is compatible with Laravel 10, 11 & 12
@@ -14,6 +56,7 @@ Appends the `track_total_hits` parameter to the DSL query, setting value to `tru
1456
$products = Product::limit(5)->withTrackTotalHits(true)->get();
1557
$totalHits = $products->getQueryMeta()->getTotalHits();
1658

59+
1760
```
1861
This can be set by default for all queries by updating the connection config in `database.php`:
1962

@@ -27,6 +70,7 @@ This can be set by default for all queries by updating the connection config in
2770
],
2871
],
2972

73+
3074
```
3175
#### 2. New feature, `createOrFail(array $attributes)`
3276

@@ -39,6 +83,7 @@ Product::createOrFail([
3983
'price' => 30,
4084
]);
4185

86+
4287
```
4388
#### 3. New feature `withRefresh(bool|string $refresh)`
4489

@@ -57,6 +102,7 @@ Product::withRefresh('wait_for')->create([
57102
'price' => 30,
58103
]);
59104

105+
60106
```
61107
### PRS
62108

@@ -165,6 +211,7 @@ People::bulkInsert([
165211

166212

167213

214+
168215
```
169216
Returns:
170217

@@ -190,6 +237,7 @@ Returns:
190237

191238

192239

240+
193241
```
194242
#### 2. Bug fix: `distinct()` aggregation now appends `searchAfter` key in meta
195243

@@ -230,6 +278,7 @@ with Laravel’s Eloquent. It lays a solid, future-proof foundation for everythi
230278

231279

232280

281+
233282
```
234283
### Breaking Changes
235284

@@ -262,6 +311,7 @@ with Laravel’s Eloquent. It lays a solid, future-proof foundation for everythi
262311

263312

264313

314+
265315
```
266316

267317
#### 3. Queries
@@ -281,6 +331,7 @@ with Laravel’s Eloquent. It lays a solid, future-proof foundation for everythi
281331

282332

283333

334+
284335
```
285336
- `orderByRandom()` Removed
286337

@@ -301,6 +352,7 @@ with Laravel’s Eloquent. It lays a solid, future-proof foundation for everythi
301352

302353

303354

355+
304356
```
305357
- Legacy Search Methods Removed
306358
All `{xx}->search()` methods been removed. Use `{multi_match}->get()` instead.
@@ -326,6 +378,7 @@ with Laravel’s Eloquent. It lays a solid, future-proof foundation for everythi
326378

327379

328380

381+
329382
```
330383
- `Schema::hasIndex` has been removed. Use `Schema::hasTable` or `Schema::indexExists` instead.
331384

@@ -395,6 +448,7 @@ Connection::on('elasticsearch')->elastic()->{clientMethod}();
395448

396449

397450

451+
398452
```
399453
### What's Changed
400454

0 commit comments

Comments
 (0)