Skip to content

Commit

Permalink
additional query clause to make the lookup of tags in group more effi…
Browse files Browse the repository at this point in the history
…cient
  • Loading branch information
Hendy committed Apr 7, 2019
1 parent b6e072b commit e175537
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Our.Umbraco.Look.BackOffice/Services/QueryService.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Our.Umbraco.Look.BackOffice.Models.Api;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
Expand Down Expand Up @@ -66,7 +65,11 @@ internal static string[] GetTagGroups(string searcherName)
/// <returns></returns>
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))
Expand Down

0 comments on commit e175537

Please sign in to comment.