mirror of
https://github.com/Codappix/search_core.git
synced 2024-11-23 02:16:11 +01:00
Do not change CGL
Keep changed for pull request to a necessary minimum.
This commit is contained in:
parent
b04ed99c07
commit
1f082ab673
1 changed files with 6 additions and 6 deletions
|
@ -98,7 +98,7 @@ abstract class AbstractIndexer implements IndexerInterface
|
||||||
{
|
{
|
||||||
$this->logger->info('Start indexing single record.', [$identifier]);
|
$this->logger->info('Start indexing single record.', [$identifier]);
|
||||||
try {
|
try {
|
||||||
$record = $this->getRecord((int)$identifier);
|
$record = $this->getRecord((int) $identifier);
|
||||||
$this->prepareRecord($record);
|
$this->prepareRecord($record);
|
||||||
|
|
||||||
$this->connection->addDocument($this->getDocumentName(), $record);
|
$this->connection->addDocument($this->getDocumentName(), $record);
|
||||||
|
@ -116,7 +116,7 @@ abstract class AbstractIndexer implements IndexerInterface
|
||||||
$this->logger->info('Finish deletion.');
|
$this->logger->info('Finish deletion.');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getRecordGenerator(): \Generator
|
protected function getRecordGenerator() : \Generator
|
||||||
{
|
{
|
||||||
$offset = 0;
|
$offset = 0;
|
||||||
$limit = $this->getLimit();
|
$limit = $this->getLimit();
|
||||||
|
@ -134,7 +134,7 @@ abstract class AbstractIndexer implements IndexerInterface
|
||||||
$record = $this->dataProcessorService->executeDataProcessor($configuration, $record, $this->identifier);
|
$record = $this->dataProcessorService->executeDataProcessor($configuration, $record, $this->identifier);
|
||||||
}
|
}
|
||||||
} catch (InvalidArgumentException $e) {
|
} catch (InvalidArgumentException $e) {
|
||||||
// Nothing to do
|
// Nothing to do.
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->handleAbstract($record);
|
$this->handleAbstract($record);
|
||||||
|
@ -166,7 +166,7 @@ abstract class AbstractIndexer implements IndexerInterface
|
||||||
/**
|
/**
|
||||||
* Returns the limit to use to fetch records.
|
* Returns the limit to use to fetch records.
|
||||||
*/
|
*/
|
||||||
protected function getLimit(): int
|
protected function getLimit() : int
|
||||||
{
|
{
|
||||||
// TODO: Make configurable.
|
// TODO: Make configurable.
|
||||||
return 50;
|
return 50;
|
||||||
|
@ -180,7 +180,7 @@ abstract class AbstractIndexer implements IndexerInterface
|
||||||
/**
|
/**
|
||||||
* @throws NoRecordFoundException If record could not be found.
|
* @throws NoRecordFoundException If record could not be found.
|
||||||
*/
|
*/
|
||||||
abstract protected function getRecord(int $identifier): array;
|
abstract protected function getRecord(int $identifier) : array;
|
||||||
|
|
||||||
abstract protected function getDocumentName(): string;
|
abstract protected function getDocumentName() : string;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue