Skip to content

Commit

Permalink
👍 Update readme and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Fayne committed Feb 23, 2024
1 parent bb3b9b7 commit 47c8b97
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/)

## [Unreleased]

## [7.6.0] - 2024-02-23
### Added
- Add one more condition. If the search() method does not pass any parameter, there is no need to add QueryStringQuery object.

## [7.5.0] - 2023-11-30
### Added
- [Added support for php 8.3](https://github.com/matchish/laravel-scout-elasticsearch/pull/266)
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,18 @@ Product::search('(title:this OR description:this) AND (title:that OR description
]);
```

And if you just want to search using RangeQuery without any query_string, you can call the search() method directly and leave the param empty.

```php

use ONGR\ElasticsearchDSL\Query\TermLevel\RangeQuery;

Product::search()
->where('price', new RangeQuery('price', [
RangeQuery::GTE => 100,
]);
```

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

### Search amongst multiple models
Expand Down

0 comments on commit 47c8b97

Please sign in to comment.