22

I have gold tag badges for both and here on Meta Stack Exchange. When voting to close a question tagged with both as a duplicate, only one of those is selected as the hammer:

At first I thought tag popularity (number of questions asked with that tag) determines the tag to be used, but today I got a counter example on Stack Overflow: (Where I have gold badges for both and , with being more popular.)

So, what determines which tag is being used as a hammer?

3
  • 1
    First alphabetically?
    – Cai
    Commented Feb 5, 2017 at 20:38
  • @Cai hmm.. interesting theory! Commented Feb 5, 2017 at 20:40
  • 3
    Already asked on MSO (no answers). It was also one of the things asked here (but no relevant, satisfying answers IMO).
    – Laurel
    Commented Feb 5, 2017 at 20:49

2 Answers 2

20
+50

Sorry to be the bearer of boring news, but we do not sort the tag badges you've acquired in any particular way. We just fetch a list of them, intersect that list with the tags on the question, and remove any tags that the user participated in adding to the question. It then just takes the first one in the list, whatever that might be.

While that means the behavior of which tag badge gets selected is inherently undefined, it should be loosely based on the order that the tag badge itself was first created and inserted into the database (we don't keep all three classes of every tag badge for every tag in the database - they just get inserted once someone first earns them).

Here on Meta, that looks like this:

List of gold tag badges on Meta Stack Exchange

That the required tags mostly happened to be created in alphabetical order was just coincidence that gave the resemblance of being sorted. But because each site is different, this ordering would be different on every site where the dupe-hammer is being used.

2
  • 1
    Does this mean the order is loosely based on the order the tags formed or the actual golden badges? Commented Oct 29, 2021 at 21:53
  • 5
    @Exempt-Medic It is not based on when the tags were created, but the tag badges themselves. Those are not created until the first person is eligible for the tag badge. Of note: the Badges table does not actually have a CreationDate column, so it's not technically based on date at all but just the order they were inserted into the table.
    – animuson StaffMod
    Commented Oct 29, 2021 at 22:17
5

I have nothing official to back this up, only a bit of searching for dupe-hammer closed questions here on MSE, but it looks like it chooses the first tag alphabetically.

Here is a reasonably sized sample of questions (all the questions I checked, I found none contradicting my theory) here on MSE that were closed by a dupe-hammer from a user (mostly you) with more than one gold tag badge for the closed question's tags; all were closed with the tag that comes first alphabetically:

6
  • Makes sense, hopefully a dev will come by and just confirm. :) Commented Feb 5, 2017 at 22:21
  • 1
    @ShadowWizardIsVaccinatedV3 Had this come up at rpg, and it seems alphabetically is not the rule, the question had [dnd-5e] and [spells] and my hammer picked [spells]. Commented Oct 18, 2021 at 12:03
  • @ThomasMarkov well, just hammered this and even though support has more questions than bug, it chose "bug" hammer. So weird. Commented Oct 19, 2021 at 7:12
  • @ThomasMarkov hmm..... maybe it picks the last earned hammer? When did you earn your [spells] hammer on RPG? Before or after the [dnd-5e] hammer? (bug hammer is my most recent) Commented Oct 19, 2021 at 7:13
  • @ShadowWizardIsVaccinatedV3 I earned [dnd-5e] first. Commented Oct 19, 2021 at 10:42
  • 1
    @ThomasMarkov the [dnd-5e] tag was added to the question only later, originally it had only [spells] so maybe when choosing hammer it looks first in the original set of tags? Commented Oct 20, 2021 at 7:02

You must log in to answer this question.

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