Skip to content

Commit

Permalink
Merge pull request #107 from matchish/fix-queue
Browse files Browse the repository at this point in the history
Don't use searchable macros
  • Loading branch information
matchish authored Mar 26, 2020
2 parents f2c00ec + 64d5001 commit f657318
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 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]

## [4.0.1] - 2020-03-26
### Fixed
- Prevent unnessasary send `\Laravel\Scout\Jobs\MakeSearchable` to a queue

## [4.0.0] - 2020-03-12
### Added
- Scout 8 Support
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "matchish/laravel-scout-elasticsearch",
"description": "Search among multiple models with ElasticSearch and Laravel Scout",
"version": "4.0.0",
"version": "4.0.1",
"keywords": [
"laravel",
"scout",
Expand Down
6 changes: 4 additions & 2 deletions src/Jobs/Stages/PullFromSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ public function __construct(ImportSource $source)

public function handle(): void
{
$results = $this->source->get();
$results->filter->shouldBeSearchable()->searchable();
$results = $this->source->get()->filter->shouldBeSearchable();
if (! $results->isEmpty()) {
$results->first()->searchableUsing()->update($results);
}
}

public function estimate(): int
Expand Down

0 comments on commit f657318

Please sign in to comment.