Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions Classes/Driver/Version6/IndexerDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
*/
class IndexerDriver extends AbstractIndexerDriver implements IndexerDriverInterface
{
/**
* @Flow\InjectConfiguration(path="indexing.retryOnConflict")
* @var int
*/
protected $retryOnConflict = 3;

/**
* {@inheritdoc}
Expand All @@ -43,7 +48,7 @@ public function document(string $indexName, NodeInterface $node, ElasticSearchDo
'update' => [
'_id' => $document->getId(),
'_index' => $indexName,
'retry_on_conflict' => 3
'retry_on_conflict' => $this->retryOnConflict ?: 3
]
],
// https://www.elastic.co/guide/en/elasticsearch/reference/5.0/docs-update.html
Expand Down Expand Up @@ -71,6 +76,7 @@ public function document(string $indexName, NodeInterface $node, ElasticSearchDo
'index' => [
'_id' => $document->getId(),
'_index' => $indexName,
'retry_on_conflict' => $this->retryOnConflict ?: 3
]
],
$documentData
Expand Down Expand Up @@ -108,7 +114,8 @@ public function fulltext(NodeInterface $node, array $fulltextIndexOfNode, ?strin
return [
[
'update' => [
'_id' => $closestFulltextNodeDocumentIdentifier
'_id' => $closestFulltextNodeDocumentIdentifier,
'retry_on_conflict' => $this->retryOnConflict ?: 3
]
],
// https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html
Expand Down
1 change: 1 addition & 0 deletions Configuration/Settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Flowpack:
command:
useSubProcesses: true
indexing:
retryOnConflict: 3
batchSize:
elements: 500
octets: 40000000
Expand Down