eZ/Bundle/EzPublishLegacySearchEngineBundle/Command/CreateIndexCommand.php 1 location
|
@@ 124-136 (lines=13) @@
|
| 121 |
|
$i = 0; |
| 122 |
|
do { |
| 123 |
|
$contentObjects = []; |
| 124 |
|
for ($k = 0; $k <= $bulkCount; ++$k) { |
| 125 |
|
if (!$row = $stmt->fetch(PDO::FETCH_ASSOC)) { |
| 126 |
|
break; |
| 127 |
|
} |
| 128 |
|
try { |
| 129 |
|
$contentObjects[] = $this->persistenceHandler->contentHandler()->load( |
| 130 |
|
$row['id'], |
| 131 |
|
$row['current_version'] |
| 132 |
|
); |
| 133 |
|
} catch (NotFoundException $e) { |
| 134 |
|
$this->logWarning($output, $progress, "Could not load current version of Content with id ${row['id']}, so skipped for indexing. Full exception: " . $e->getMessage()); |
| 135 |
|
} |
| 136 |
|
} |
| 137 |
|
|
| 138 |
|
$this->searchHandler->bulkIndex( |
| 139 |
|
$contentObjects, |
eZ/Publish/Core/Search/Elasticsearch/Content/Indexer.php 1 location
|
@@ 51-63 (lines=13) @@
|
| 48 |
|
$i = 0; |
| 49 |
|
do { |
| 50 |
|
$contentObjects = []; |
| 51 |
|
for ($k = 0; $k <= $iterationCount; ++$k) { |
| 52 |
|
if (!$row = $stmt->fetch(PDO::FETCH_ASSOC)) { |
| 53 |
|
break; |
| 54 |
|
} |
| 55 |
|
try { |
| 56 |
|
$contentObjects[] = $this->persistenceHandler->contentHandler()->load( |
| 57 |
|
$row['id'], |
| 58 |
|
$row['current_version'] |
| 59 |
|
); |
| 60 |
|
} catch (NotFoundException $e) { |
| 61 |
|
$this->logWarning($progress, "Could not load current version of Content with id ${row['id']}, so skipped for indexing. Full exception: " . $e->getMessage()); |
| 62 |
|
} |
| 63 |
|
} |
| 64 |
|
foreach ($contentObjects as $contentObject) { |
| 65 |
|
try { |
| 66 |
|
$this->searchHandler->indexContent($contentObject); |