Apply fixes from StyleCI
This commit is contained in:
parent
a02d35394b
commit
db74da3e37
|
|
@ -48,7 +48,8 @@ class SearchController extends ListDiscussionsController
|
||||||
];
|
];
|
||||||
|
|
||||||
public function __construct(protected Client $elastic, protected UrlGenerator $uri)
|
public function __construct(protected Client $elastic, protected UrlGenerator $uri)
|
||||||
{}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
protected function data(ServerRequestInterface $request, Document $document)
|
protected function data(ServerRequestInterface $request, Document $document)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ namespace Blomstra\Search\Commands;
|
||||||
use Blomstra\Search\Jobs\Job;
|
use Blomstra\Search\Jobs\Job;
|
||||||
use Blomstra\Search\Jobs\SavingJob;
|
use Blomstra\Search\Jobs\SavingJob;
|
||||||
use Blomstra\Search\Seeders\Seeder;
|
use Blomstra\Search\Seeders\Seeder;
|
||||||
use Carbon\Carbon;
|
|
||||||
use Elasticsearch\Client;
|
use Elasticsearch\Client;
|
||||||
use Flarum\Settings\SettingsRepositoryInterface;
|
use Flarum\Settings\SettingsRepositoryInterface;
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
|
|
@ -142,12 +141,12 @@ class BuildCommand extends Command
|
||||||
$response = (new Builder($client))
|
$response = (new Builder($client))
|
||||||
->index($index)
|
->index($index)
|
||||||
->size(1000)
|
->size(1000)
|
||||||
->addQuery((new BoolQuery)
|
->addQuery(
|
||||||
|
(new BoolQuery())
|
||||||
->add((new RangeQuery('rawId'))
|
->add((new RangeQuery('rawId'))
|
||||||
->gte($continueAt - 1000)
|
->gte($continueAt - 1000)
|
||||||
->lte($continueAt))
|
->lte($continueAt))
|
||||||
->add(TermQuery::create('type', $seeder->type()))
|
->add(TermQuery::create('type', $seeder->type()))
|
||||||
|
|
||||||
)
|
)
|
||||||
->search();
|
->search();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ class SavingJob extends Job
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
->flatten(1);
|
->flatten(1);
|
||||||
dump($body);
|
dump($body);
|
||||||
$response = $client->bulk([
|
$response = $client->bulk([
|
||||||
'index' => $this->index,
|
'index' => $this->index,
|
||||||
'body' => $body->toArray(),
|
'body' => $body->toArray(),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue