This commit is contained in:
@@ -197,11 +197,13 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//EXACT MATCH SEARCH TERMS
|
//EXACT MATCH SEARCH TERMS
|
||||||
foreach (string Term in SearchTerms)
|
foreach (string Term in SearchTerms)
|
||||||
q.Append($"COUNT(*) FILTER (WHERE asearchdictionary.word = '{Term}') AS 'st{++termCount}', ");
|
q.Append($"COUNT(*) FILTER (WHERE asearchdictionary.word = '{Term}') AS st{++termCount}, ");
|
||||||
|
|
||||||
//WILDCARD SEARCH TERMS
|
//WILDCARD SEARCH TERMS
|
||||||
foreach (string WildCardSearchTerm in PreWildCardedSearchTerms)
|
foreach (string WildCardSearchTerm in PreWildCardedSearchTerms)
|
||||||
q.Append($"COUNT(*) FILTER (WHERE asearchdictionary.word LIKE '{WildCardSearchTerm}') AS 'st{++termCount}', ");
|
q.Append($"COUNT(*) FILTER (WHERE asearchdictionary.word LIKE '{WildCardSearchTerm}') AS st{++termCount}, ");
|
||||||
|
|
||||||
|
q.Length=q.Length-2;//trim the final comma and space
|
||||||
|
|
||||||
q.Append(" FROM asearchdictionary INNER JOIN asearchkey ON asearchdictionary.id = asearchkey.wordid GROUP BY asearchkey.objectid, asearchkey.atype) SELECT objectid, atype FROM qr WHERE ");
|
q.Append(" FROM asearchdictionary INNER JOIN asearchkey ON asearchdictionary.id = asearchkey.wordid GROUP BY asearchkey.objectid, asearchkey.atype) SELECT objectid, atype FROM qr WHERE ");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user