diff --git a/src/Api/Controllers/SearchController.php b/src/Api/Controllers/SearchController.php index d9d00a1..a59997f 100644 --- a/src/Api/Controllers/SearchController.php +++ b/src/Api/Controllers/SearchController.php @@ -48,7 +48,8 @@ class SearchController extends ListDiscussionsController ]; public function __construct(protected Client $elastic, protected UrlGenerator $uri) - {} + { + } protected function data(ServerRequestInterface $request, Document $document) { diff --git a/src/Commands/BuildCommand.php b/src/Commands/BuildCommand.php index 4fcf31b..7534049 100644 --- a/src/Commands/BuildCommand.php +++ b/src/Commands/BuildCommand.php @@ -15,7 +15,6 @@ namespace Blomstra\Search\Commands; use Blomstra\Search\Jobs\Job; use Blomstra\Search\Jobs\SavingJob; use Blomstra\Search\Seeders\Seeder; -use Carbon\Carbon; use Elasticsearch\Client; use Flarum\Settings\SettingsRepositoryInterface; use Illuminate\Console\Command; @@ -142,12 +141,12 @@ class BuildCommand extends Command $response = (new Builder($client)) ->index($index) ->size(1000) - ->addQuery((new BoolQuery) + ->addQuery( + (new BoolQuery()) ->add((new RangeQuery('rawId')) ->gte($continueAt - 1000) ->lte($continueAt)) ->add(TermQuery::create('type', $seeder->type())) - ) ->search(); diff --git a/src/Jobs/SavingJob.php b/src/Jobs/SavingJob.php index 578cdb8..497c699 100644 --- a/src/Jobs/SavingJob.php +++ b/src/Jobs/SavingJob.php @@ -35,7 +35,7 @@ class SavingJob extends Job ]; }) ->flatten(1); -dump($body); + dump($body); $response = $client->bulk([ 'index' => $this->index, 'body' => $body->toArray(),