This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user