7

This question is related to two questions one on this site: What to do with tags that have multiple names in different countries?

and a Meta question on Outdoors.SE Specifically my answer Here

So a user (who looks like he's a mod on another site) as asking some questions that I can't answer. Specifically:

All merging does is take any previous questions which have one of the synonyms, and convert it to the master, for the sake of consistency. It does not preclude the presence of synonyms. If you merge abseiling into rappelling and create a synonym, people can still find the right tag! If they were to type abseiling into the tag bar, it would suggest rappelling and say abseiling in small text under it. If you support synonyms, there is no reason you should not support merging. Merging is just fixing tags from before a synonym was created.

So can someone clarify (as their seems to be some confusion) to me what the differences are between adding a tag synonym and merging two tags together? Is the user above correct?

I'm confused because the person (above) seems to be someone who knows what they are talking about but what he suggests seems to contridict the advice I was given in my previous meta post.

  • All information from the answers should be available in the FAQ for synonyms, which I just restructured a bit. If not, consider adding it. – Wrzlprmft Aug 20 '15 at 8:09
6

Merging (a mod-only action) and synonymising are somewhat independent actions, although they can be done in concert (by a moderator).

When you create a synonym , all it essentially does is the following:

  • Questions which are tagged will act as though they are tagged . This is accomplished by adding an entry to the TagSynonyms table in the database.
  • Whenever the tag is added to a question (or a question tagged is edited), the tag will actually be added to the question (in the database).

Importantly no changes are made to the posts within the database. Any existing questions still have that tag after the synonym is created, although it will seem as though they have the tag.

In contrast, merging into is a largely silent process which converts all occurrences of the tag into . Once the merge is completed, no questions will have the tag in the database. But merging alone will not cause the system to see and as the same. For example, searching [foo] will only return questions tagged , and similarly for searching [bar].

When a moderator either creates a tag synonym or merges two tags, they are given the option to complete the other action at the same time.

It is possible for either action to be done independently.

  • Merging without synonymising is a useful way to prepare mis-spelled tags such as for removal. Here we don't really want to create the synonym, but the intended tag is obvious. When the tag-removal script later detects no questions with that tag, it will be removed.
  • Synonymsing without merging makes it possible to retain some older occurrences of the tag if the synonym is later removed. This is useful in cases where the two tags don't mean exactly the same thing and you want to leave the possibility to at least partially undo this action. (Again, in this case no new occurrences of will be created while the synonym is active.)
  • So in both instances, if someone searches for a tag in a question, they would be offered both foo and bar? – Liam Aug 20 '15 at 8:05
  • 1
    @Liam Only synonymising foobar will affect search results in that way. Merging by itself is destructive of all instances of foo, and doesn't create an entry in the TagSynonyms table. – user642796 Aug 20 '15 at 8:09
  • @ArthurFischer merging does not, but the tag merge interface gives you the option to create a synonym at the same time. A tag merge does not preclude you from also creating a synonym. – nhinkle Aug 20 '15 at 10:11
  • 1
    @nhinkle Yeah, perhaps that wasn't entirely clear. I hope my edit made that point a little more obvious. – user642796 Aug 20 '15 at 10:23
  • How do you merge without creating a synonym? /admin/merge-tags doesn't remove the old tag; it creates a synonym (whether the old tag exists or not, even, which is a way to preemptively create synonyms). – Gilles Aug 20 '15 at 12:18
  • @Gilles Really? I was sure that /admin/merge-tags and /admin/create-tag-synonym were complements of each other, and didn't provide the same functionality. At least this seems to suggest only a merge. – user642796 Aug 20 '15 at 12:33
  • @ArthurFischer hmm, ?removetag=… is new. But still I see a notice that a synonym will be created for a non-existing source tag. And I tested with an existing tag too, I'm told “A tag synonym mapping programmation → informatique will be created.” and the tag synonym is indeed created. – Gilles Aug 20 '15 at 13:36
  • @Gilles: Did you check the »These two tags are synonyms and mean the exact same thing« option for that? – user642796 Aug 20 '15 at 13:48
  • @ArthurFischer Yes. Huh, you mean that if I don't check that box, it goes along with the merge but doesn't create a synonym? That's weird. Doing the merge is only correct when the tags are synonyms in the English sense. – Gilles Aug 20 '15 at 13:52
  • @Gilles Usually you're right, but it has happened on Mathematics (and I am sure elsewhere) that a misspelled tag is created and accumulates a nontrivial number of questions before being noticed. In this case a synonym between the tags isn't really ideal, and simply merging the misspelled tag into a correctly-spelled tag is a quick fix. – user642796 Aug 20 '15 at 13:59
  • 1
    @ArthurFischer I know, I've done that plenty of times, but by doing a merge and then removing the synonym. All these years and I didn't know you could use the merge tool to do a rename in one step! – Gilles Aug 20 '15 at 14:22
4

Merging permanently binds tags together so that all are now tagged with the master tag amongst them. The others remain as synonyms (but appear on no questions). Later decoupling is not possible.

When a tag is only made a synonym of another it means that it will appear on no new questions, or remain on any edited questions, but it stays on any untouched old questions. Decoupling it from its master tag at a later stage remains possible.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .