You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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.
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 abefore_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.
The text was updated successfully, but these errors were encountered: