static L imSearch(S query) { query = trim(query); new Matches m; S qname = query, qcomment = query; if (flexMatch("* [*]", query, m)) { qname = $1; qcomment = $2; } new Map scores; for (AIConcept c : values(aiConceptsMap_cached())) { int score = scoredSearch_score(c.name, qname)*2; score += scoredSearch_score(c.comment, qcomment); if (eqic(c.globalID, query)) score += 10; if (score != 0) scores.put(c, score); } ret keysSortedByValuesDesc(scores); }