This commit is contained in:
2018-09-21 15:49:25 +00:00
parent da278aac3e
commit 93942d6d8f
2 changed files with 68 additions and 75 deletions

View File

@@ -172,7 +172,6 @@ namespace AyaNova.Biz
}
//SEARCH SEARCHKEY FOR MATCHING WORDS AND OPTIONALLY TYPE AND INNAME
List<SearchKey> SearchKeyMatches = new List<SearchKey>();
//Build search query based on searchParameters
var q = ct.SearchKey.Distinct().Where(m => DictionaryMatches.Contains(m.Id));
@@ -187,21 +186,15 @@ namespace AyaNova.Biz
//Find the records that have all the words
var SearchMatches = q.GroupBy(x => new { x.ObjectType, x.ObjectId }).Select(x => new { ObjectId = x.Key.ObjectId, ObjectType = x.Key.ObjectType, ObjectCount = x.LongCount() });
foreach (var SearchMatch in SearchMatches)
{
MatchingObjects.Add(new AyaTypeId(SearchMatch.ObjectType, SearchMatch.ObjectId));
}
//Trigger the search
// SearchKeyMatches = await q.ToListAsync();
// need to group by object type and id and count instead?
//PUT THE RESULTS INTO MATCHING OBJECTS LIST
// foreach (SearchKey SearchKeyMatch in SearchKeyMatches)
// {
// MatchingObjects.Add(new AyaTypeId(SearchKeyMatch.ObjectType, SearchKeyMatch.ObjectId));
// }
foreach (var SearchMatch in SearchMatches)
{
//Is this going to require checking the count??
MatchingObjects.Add(new AyaTypeId(SearchMatch.ObjectType, SearchMatch.ObjectId));
}
//IF TAGS SPECIFIED