aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/FullTextSearch
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2019-07-14 19:17:55 -0100
committerMaxence Lange <maxence@artificial-owl.com>2019-07-14 19:17:55 -0100
commitcb91b3ce3e63305d60f5cdd11a68120a649d7746 (patch)
treed786b6f2f8b7a7410ec79e4868dcc5a90d387d27 /lib/private/FullTextSearch
parentb3249f931b4b73e33c46a145a660e5f3fcbcd7e1 (diff)
downloadnextcloud-server-cb91b3ce3e63305d60f5cdd11a68120a649d7746.tar.gz
nextcloud-server-cb91b3ce3e63305d60f5cdd11a68120a649d7746.zip
addsubtag should push to array
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/private/FullTextSearch')
-rw-r--r--lib/private/FullTextSearch/Model/IndexDocument.php7
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.
*