Skip to content

Commit

Permalink
Add changelog and update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Malezha committed Nov 13, 2024
1 parent b097275 commit a48dc2e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/)

## [Unreleased]
### Fixed
- [Using pagination with custom query in Scout Builder](https://github.com/matchish/laravel-scout-elasticsearch/pull/290).
### Added
- [Using `options()` of a builder](https://github.com/matchish/laravel-scout-elasticsearch/issues/252) for set `from` parameter.
- Supporting `take()` method of builder for setting response `size`.

## [7.8.0] - 2024-06-24
### Added
- [Added supports of whereNotIn condition]([https://github.com/matchish/laravel-scout-elasticsearch/pull/282](https://github.com/matchish/laravel-scout-elasticsearch/pull/286).
-
- [Added supports of whereNotIn condition](https://github.com/matchish/laravel-scout-elasticsearch/pull/282).

## [7.6.2] - 2024-06-24
### Fixed
- [Change if conditions order in soft deletes check for compatibility](https://github.com/matchish/laravel-scout-elasticsearch/pull/282).
Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,25 @@ Product::search()

Full list of ElasticSearch terms is in `vendor/handcraftedinthealps/elasticsearch-dsl/src/Query/TermLevel`.

### Pagination
The engine supports [Elasticsearch pagination](https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html)
with [Scout Builder pagination](https://laravel.com/docs/11.x/scout#pagination) or by setting page sizes
and offsets using the `->take($size)` method and `->options(['from' => $from])`.

> Caution : Builder pagination takes precedence over the `take()` and `options()` setting.
For example:

```php
Product::search()
->take(20)
->options([
'from' => 20,
])
->paginate(50);
```
This will return the first 50 results, ignoring the specified offset.

### Search amongst multiple models
You can do it with `MixedSearch` class, just pass indices names separated by commas to the `within` method.
```php
Expand Down

0 comments on commit a48dc2e

Please sign in to comment.