Skip to content

Commit 5e2bd33

Browse files
committed
TASK: Add missing check for removed and hidden nodes in Driver 2.x
1 parent ec88f8d commit 5e2bd33

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Driver/Version2

Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Driver/Version2/IndexerDriver.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,10 @@ public function fulltext(NodeInterface $node, array $fulltextIndexOfNode, $targe
127127
ctx._source.__fulltextParts = new HashMap();
128128
}
129129
130-
if (fulltext.size() == 0) {
131-
ctx._source.__fulltextParts.remove(identifier);
130+
if (nodeIsRemoved || nodeIsHidden || fulltext.size() == 0) {
131+
if (ctx._source.__fulltextParts.containsKey(identifier)) {
132+
ctx._source.__fulltextParts.remove(identifier);
133+
}
132134
} else {
133135
ctx._source.__fulltextParts.put(identifier, fulltext);
134136
}

0 commit comments

Comments
 (0)