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

Prevent creation of tags that are too similar to already existing tags. #381

Open
alexanderjeurissen opened this issue Mar 23, 2016 · 3 comments

Comments

@alexanderjeurissen
Copy link

To prevent clutter and pollution of the tagspace it could be of interest to use the postgres similarity extensions which uses the Trigram similarity measure to determine how similar entities are.

This is quite easy to implement just a matter of enabling the pg_trgm extension by means of a migration and adding a before_save hook on the tag model.

We can experiment with the similarity threshold but my suggestion would be to use a threshold of 0.3
I've implemented similar functionality quite recently in another rails app so if this sounds interesting let me know and I'll create a PR whenever I have some spare time.

@jurre
Copy link
Contributor

jurre commented Mar 24, 2016

Hi Alexander,

This definitely sounds interesting, but it would be even nicer if we could fix this by suggesting better tags in the tag autocomplete functionality, maybe using this same postgres extension.

It is possible that people would need to create tags that are very similar but have a distinct different meaning for users, blocking those could be annoying.

@alexanderjeurissen
Copy link
Author

We could do both ;) but yeah better suggestions is also a possible use-case for similarity measures. We could basically have a class method that would return all tags that meet a certain similarity threshold and sort them by similarity.

I understand your concerns regarding blocking similar tags as a workaround we could allow teams to specify the threshold themselves (per tenant) then if a team wants to use semantic versioning tags (which will alway be very similar) then they can choose a very loose threshold.

The downside of not limiting duplicate tags is the risk of a polluted tagspace which in my opinion far outweighs the possible frustration of a few users as it limits the value of tags and the level of insight they provide.

@jurre
Copy link
Contributor

jurre commented Mar 24, 2016

The ability to merge tags could also help here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants