Skip to content

Commit

Permalink
fix: don't use davtags for tag search
Browse files Browse the repository at this point in the history
1. #26813 Initial implementation with support for systemtags and davtags (vcategory)
2. #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>
  • Loading branch information
kesselb committed Dec 1, 2023
1 parent c9aa055 commit b0abff6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions apps/systemtags/lib/Search/TagSearchProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,7 @@ public function search(IUser $user, ISearchQuery $query): SearchResult {

$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 ? [
Expand Down

0 comments on commit b0abff6

Please sign in to comment.