Skip to content

Commit e175537

Browse files
committed
additional query clause to make the lookup of tags in group more efficient
1 parent b6e072b commit e175537

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Our.Umbraco.Look.BackOffice/Services/QueryService.cs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using Our.Umbraco.Look.BackOffice.Models.Api;
2-
using System;
32
using System.Collections.Generic;
43
using System.Globalization;
54
using System.Linq;
@@ -66,7 +65,11 @@ internal static string[] GetTagGroups(string searcherName)
6665
/// <returns></returns>
6766
internal static string[] GetTagNames(string searcherName, string tagGroup)
6867
{
69-
return new LookQuery(searcherName) { TagQuery = new TagQuery() }
68+
return new LookQuery(searcherName)
69+
{
70+
TagQuery = new TagQuery(),
71+
RawQuery = "Look_TagGroup_" + tagGroup + ":1"
72+
}
7073
.Search()
7174
.Matches
7275
.SelectMany(x => x.Tags.Where(y => y.Group == tagGroup))

0 commit comments

Comments
 (0)