Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Searching mods by their abbreviation / alternate names #1313

Closed
mongoose11235813 opened this issue Jul 17, 2015 · 3 comments
Closed

Searching mods by their abbreviation / alternate names #1313

mongoose11235813 opened this issue Jul 17, 2015 · 3 comments
Labels
Core (ckan.dll) Issues affecting the core part of CKAN Enhancement New features or functionality GUI Issues affecting the interactive GUI Spec Issues affecting the spec ★☆☆

Comments

@mongoose11235813
Copy link

Is it possible to make a search capable of finding mods by their abbreviations? E.g. Kerbal Attachment System - KAS, Kerbal Inventory System - KIS and so on.
Some people don't even know/remember whole names of mods because everyone on forums uses abbreviations instead.

@Postremus Postremus added Enhancement New features or functionality GUI Issues affecting the interactive GUI ★☆☆ labels Jul 17, 2015
@mheguy mheguy added Core (ckan.dll) Issues affecting the core part of CKAN Spec Issues affecting the spec labels Jul 17, 2015
@mheguy mheguy changed the title Searching mods by their abbrivation Searching mods by their abbreviation / alternate names Jul 17, 2015
@mheguy
Copy link
Contributor

mheguy commented Jul 17, 2015

A full implementation would require a new metadata field (probably inside resources) to list alternate names. A much more 'cheaty' (but incomplete) implementation would be adding the alternate names in parentheses to the existing name field.

@Dazpoet
Copy link
Member

Dazpoet commented Aug 20, 2015

One might also consider making the "provides" field searchable seeing as some mods acctually have that one. When I first started ckanning I remember thinking it weird that I couldn't search for FAR or NEAR when clearly their metadata include those as alternate names.

@HebaruSan
Copy link
Member

GUI already does this by pre-calculating the abbreviations:

CKAN/GUI/GUIMod.cs

Lines 242 to 243 in 8746077

Abbrevation = new string(mod.name.Split(' ').
Where(s => s.Length > 0).Select(s => s[0]).ToArray());

CKAN/GUI/MainModList.cs

Lines 745 to 750 in 8746077

private bool IsNameInNameFilter(GUIMod mod)
{
return mod.Name.IndexOf(ModNameFilter, StringComparison.InvariantCultureIgnoreCase) != -1
|| mod.Abbrevation.IndexOf(ModNameFilter, StringComparison.InvariantCultureIgnoreCase) != -1
|| mod.Identifier.IndexOf(ModNameFilter, StringComparison.InvariantCultureIgnoreCase) != -1;
}

Closing as fixed by #1430.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core (ckan.dll) Issues affecting the core part of CKAN Enhancement New features or functionality GUI Issues affecting the interactive GUI Spec Issues affecting the spec ★☆☆
Projects
None yet
Development

No branches or pull requests

5 participants