From e1755375d04da2b31a2363773df295f8e60519c5 Mon Sep 17 00:00:00 2001 From: Hendy Racher Date: Sun, 7 Apr 2019 18:31:16 +0100 Subject: [PATCH] additional query clause to make the lookup of tags in group more efficient --- src/Our.Umbraco.Look.BackOffice/Services/QueryService.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Our.Umbraco.Look.BackOffice/Services/QueryService.cs b/src/Our.Umbraco.Look.BackOffice/Services/QueryService.cs index a0608fe..2287270 100644 --- a/src/Our.Umbraco.Look.BackOffice/Services/QueryService.cs +++ b/src/Our.Umbraco.Look.BackOffice/Services/QueryService.cs @@ -1,5 +1,4 @@ using Our.Umbraco.Look.BackOffice.Models.Api; -using System; using System.Collections.Generic; using System.Globalization; using System.Linq; @@ -66,7 +65,11 @@ internal static string[] GetTagGroups(string searcherName) /// internal static string[] GetTagNames(string searcherName, string tagGroup) { - return new LookQuery(searcherName) { TagQuery = new TagQuery() } + return new LookQuery(searcherName) + { + TagQuery = new TagQuery(), + RawQuery = "Look_TagGroup_" + tagGroup + ":1" + } .Search() .Matches .SelectMany(x => x.Tags.Where(y => y.Group == tagGroup))