public static void Add(this CrawledTrie <CrawledIssue> trie, CrawledIssue issue) { var terms = issue.GetTrieTerms(); foreach (var term in terms) { trie.Add(term, issue); } }
static void ApplyTerm(ref HashSet <CrawledIssue> result, CrawledTrie <CrawledIssue> trie, string term) { var issues = trie.Lookup(term); if (result is null) { result = issues.ToHashSet(); } else { result.IntersectWith(issues); } }