diff options
Diffstat (limited to 'lib/private/FullTextSearch/Model/IndexDocument.php')
-rw-r--r-- | lib/private/FullTextSearch/Model/IndexDocument.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/FullTextSearch/Model/IndexDocument.php b/lib/private/FullTextSearch/Model/IndexDocument.php index 55cce902a28..d5bef906021 100644 --- a/lib/private/FullTextSearch/Model/IndexDocument.php +++ b/lib/private/FullTextSearch/Model/IndexDocument.php @@ -359,11 +359,16 @@ class IndexDocument implements IIndexDocument, JsonSerializable { * @return IIndexDocument */ final public function addSubTag(string $sub, string $tag): IIndexDocument { - $this->subTags[$sub] = $tag; + if (!array_key_exists($sub, $this->subTags)) { + $this->subTags[$sub] = []; + } + + $this->subTags[$sub][] = $tag; return $this; } + /** * Set the list of sub tags assigned to the original document. * |