]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix: don't use davtags for tag search 40445/head
authorDaniel Kesselberg <mail@danielkesselberg.de>
Thu, 14 Sep 2023 10:31:33 +0000 (12:31 +0200)
committerDaniel <mail@danielkesselberg.de>
Mon, 18 Sep 2023 12:14:27 +0000 (14:14 +0200)
1. https://github.com/nextcloud/server/pull/26813 Initial implementation with support for systemtags and davtags (vcategory)
2. https://github.com/nextcloud/server/pull/39062 Additional check if the given tag exists, though ISystemTagManager.getAllTags only looks for systemtags

Therefore it's not possible anymore to search for davtags and unnecessary to join the other tables.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
apps/systemtags/lib/Search/TagSearchProvider.php

index 5c731e42cc3e06d8bc0af4af5099350241234b38..2ff5cc984abd99a213df0b36aefe7cf1c84fefff 100644 (file)
@@ -120,10 +120,7 @@ class TagSearchProvider implements IProvider {
 
                $userFolder = $this->rootFolder->getUserFolder($user->getUID());
                $fileQuery = new SearchQuery(
-                       new SearchBinaryOperator(SearchBinaryOperator::OPERATOR_OR, [
-                               new SearchComparison(ISearchComparison::COMPARE_LIKE, 'tagname', '%' . $query->getTerm() . '%'),
-                               new SearchComparison(ISearchComparison::COMPARE_LIKE, 'systemtag', '%' . $query->getTerm() . '%'),
-                       ]),
+                       new SearchComparison(ISearchComparison::COMPARE_LIKE, 'systemtag', '%' . $query->getTerm() . '%'),
                        $query->getLimit(),
                        (int)$query->getCursor(),
                        $query->getSortOrder() === ISearchQuery::SORT_DATE_DESC ? [