4

I've recently started work on a tool to track and organize burnination requests. At its core, it tracks the number of questions attached to questions found in burnination requests.

Part of that tool is tracking synonym requests, as well as detecting when a tag is synonomised.

I grab the number of questions per tag with the api /2.2/tags/{tag-list}/info. However, today, I noticed some strange fluctuations in the question counts:

enter image description here

Initially, I thought I was accidentally storing the count from another tag. However, 951 exactly matches the count here (filter to 'messages' (screenshot)).

This behaviour is not consistent. It alternates between returning the tag's master (with the requested tag listed as a synonym), and the synonymised tag itself.

I was able to log one of the bad responses, with the important part of the payload here:

{"last_activity_date":1534456019,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":951,"name":"messages"}

However, it should return (and half of the time does):

{"synonyms":["messages"],"last_activity_date":1545206963,"has_synonyms":true,"is_moderator_only":false,"is_required":false,"count":2792,"name":"message"}

The request I'm making

The full response I get:

{"items":[{"synonyms":["apis"],"last_activity_date":1545262830,"has_synonyms":true,"is_moderator_only":false,"is_required":false,"count":64826,"name":"api"},{"synonyms":["generic",".net-generics","generic-class","swift-generics","java-generics","kotlin-generics","scala-generics"],"last_activity_date":1545263834,"has_synonyms":true,"is_moderator_only":false,"is_required":false,"count":36205,"name":"generics"},{"synonyms":["scrolling"],"last_activity_date":1545237499,"has_synonyms":true,"is_moderator_only":false,"is_required":false,"count":17596,"name":"scroll"},{"synonyms":["ui-router","angularjs-ui-router"],"last_activity_date":1545215811,"has_synonyms":true,"is_moderator_only":false,"is_required":false,"count":9657,"name":"angular-ui-router"},{"synonyms":["duplicate","duplicate-entry","duplicate-removal","duplication","duplicate-content","duplicate-detection","duplicate-data","deduplication","ignore-duplicates","no-duplicates"],"last_activity_date":1545232365,"has_synonyms":true,"is_moderator_only":false,"is_required":false,"count":9468,"name":"duplicates"},{"synonyms":["tag"],"last_activity_date":1545262468,"has_synonyms":true,"is_moderator_only":false,"is_required":false,"count":9171,"name":"tags"},{"synonyms":["web.config"],"last_activity_date":1545239731,"has_synonyms":true,"is_moderator_only":false,"is_required":false,"count":7851,"name":"web-config"},{"synonyms":["migrations"],"last_activity_date":1545259256,"has_synonyms":true,"is_moderator_only":false,"is_required":false,"count":7665,"name":"migration"},{"last_activity_date":1545219246,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":5288,"name":"editor"},{"last_activity_date":1545224729,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":4632,"name":"httpclient"},{"synonyms":["uniqueness"],"last_activity_date":1545168151,"has_synonyms":true,"is_moderator_only":false,"is_required":false,"count":4297,"name":"unique"},{"synonyms":["actions"],"last_activity_date":1545217474,"has_synonyms":true,"is_moderator_only":false,"is_required":false,"count":4130,"name":"action"},{"synonyms":["instances"],"last_activity_date":1545259212,"has_synonyms":true,"is_moderator_only":false,"is_required":false,"count":4012,"name":"instance"},{"last_activity_date":1545223067,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":3922,"name":"programming-languages"},{"synonyms":["products"],"last_activity_date":1545241040,"has_synonyms":true,"is_moderator_only":false,"is_required":false,"count":3645,"name":"product"},{"last_activity_date":1545258247,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":3535,"name":"linkedin"},{"last_activity_date":1545247450,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":3378,"name":"selection"},{"synonyms":["angularjs-promise"],"last_activity_date":1545242966,"has_synonyms":true,"is_moderator_only":false,"is_required":false,"count":1957,"name":"angular-promise"},{"last_activity_date":1545080414,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":1869,"name":"send"},{"last_activity_date":1545242837,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":1853,"name":"devops"},{"last_activity_date":1545239872,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":1672,"name":"percentage"},{"last_activity_date":1545264158,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":1652,"name":"detection"},{"synonyms":["targets"],"last_activity_date":1545230220,"has_synonyms":true,"is_moderator_only":false,"is_required":false,"count":1543,"name":"target"},{"last_activity_date":1545142278,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":1357,"name":"angular-ngmodel"},{"synonyms":["handles"],"last_activity_date":1544598722,"has_synonyms":true,"is_moderator_only":false,"is_required":false,"count":1127,"name":"handle"},{"last_activity_date":1544945869,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":1127,"name":"restful-url"},{"last_activity_date":1545126671,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":1126,"name":"jetbrains"},{"synonyms":["samples"],"last_activity_date":1544893457,"has_synonyms":true,"is_moderator_only":false,"is_required":false,"count":1016,"name":"sample"},{"last_activity_date":1544628421,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":1004,"name":"msdn"},{"last_activity_date":1545264444,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":984,"name":"pagespeed"},{"last_activity_date":1534456019,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":951,"name":"messages"},{"synonyms":["behaviors","behaviour","behaviours"],"last_activity_date":1545144175,"has_synonyms":true,"is_moderator_only":false,"is_required":false,"count":935,"name":"behavior"},{"last_activity_date":1545239055,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":806,"name":"cs50"},{"last_activity_date":1545217711,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":796,"name":"samba"},{"last_activity_date":1543762756,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":716,"name":"separator"},{"last_activity_date":1544957690,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":705,"name":"advertising"},{"last_activity_date":1545052078,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":680,"name":"weight"},{"synonyms":["lights"],"last_activity_date":1545249618,"has_synonyms":true,"is_moderator_only":false,"is_required":false,"count":505,"name":"light"},{"last_activity_date":1545140865,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":474,"name":"items"},{"last_activity_date":1545169273,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":342,"name":"numpy-ndarray"},{"last_activity_date":1544957260,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":330,"name":"ownership"},{"synonyms":["letters"],"last_activity_date":1545074714,"has_synonyms":true,"is_moderator_only":false,"is_required":false,"count":232,"name":"letter"},{"last_activity_date":1545266249,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":207,"name":"bold"},{"last_activity_date":1544366090,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":185,"name":"viewport-units"},{"last_activity_date":1536001293,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":52,"name":"angular-ui-datepicker"},{"last_activity_date":1543492185,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":49,"name":"chip"},{"last_activity_date":1544472521,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":47,"name":"piracy-prevention"},{"last_activity_date":1528857185,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":42,"name":"ng-html2js"},{"last_activity_date":1485283945,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":32,"name":"angular-new-router"},{"last_activity_date":1473968024,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":20,"name":"godaddy"},{"last_activity_date":1453312850,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":8,"name":"cheeseshop"},{"last_activity_date":1505886754,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":7,"name":"php-beautifier"},{"last_activity_date":1514841788,"has_synonyms":false,"is_moderator_only":false,"is_required":false,"count":6,"name":"kaleidoscope"}],"has_more":false,"quota_max":10000,"quota_remaining":9476}
  • That's a bug, but since you are searching for messages and messages is not a tag, the API should consistently return zero for that value. Or possibly 3,743, if the API devs want to be extra nice (map a synonym to its tag fully). – Awesome Poodles Dec 20 '18 at 1:51
  • @AwesomePoodles It is a tag - it's just a synonym. It still exists in the system. 3743 might be a good solution, that's the cause of the initial spike in the graph (I was initially querying /questions?tagged=messages). I'm not too concerned with what it returns (perhaps the first example (the 'bad response') with a "SynonymOf" field would be ideal).. but it should at least be consistent – Rob Dec 20 '18 at 2:31

You must log in to answer this question.

Browse other questions tagged .