Notice: Do you have an artist tag on Gelbooru? Let us know so we can properly credit you!

Now Viewing: Number of images that show up with tag search less than tag claims

Keep it civil, do not flame or bait other users. If you notice anything illegal or inappropriate being discussed, contact an administrator or moderator.

DearS_Lover91 Group: Member - Total Posts: 8
Number of images that show up with tag search less than tag claims
Posted on: 12/14/12 01:04PM
I've been noticing that the number of images that show up for any given tag is lower than the amount stated next to the tag. For example, the tag fyama;s=list&tags=fyama has 65 next to it, but I only see 28 images. Could someone please explain whether the image count is supposed to be lower or not, and why? Is it something to do with removed images? Thanks in advance.

Jerl Group: Administrator's Pet - Total Posts: 4345
Posted on: 12/14/12 01:28PM
Yes, it absolutely has something to do with removed images, and the way that the tag indexer treats them.

Most images that are removed aren't actually completely deleted. Their post page, including tags and comments, remains so that the deletion can be appealed. This means that all of its information is still in the database.

The tag indexer works by grabbing all of the tags directly from the database and tallying them up. Since the information from deleted images is still in the database, it grabs those too, and adds them to the counter. This obviously messes up the count.

This may eventually be fixed in a future version, but for now you're much better off getting the actual post count from the API. This count is a lot more accurate than the one in the tag list. The API call for the tag you're asking about is as follows:;q=index&tags=fyama

You can replace "fyama" with any other tag search to retrieve the API results for that search.

This gives a post count of 33, which is the same as the number of posts as I'm currently counting in the tag.

As for the 5 posts that I'm seeing but you aren't, chances are they're being filtered out by your blacklist. Remember that posts with scores less than 0 are blacklisted by default, so in order to see them, you must go into your account settings and set the score threshold lower than 0.

lolligag9 Group: Member - Total Posts: 2
Insulting response to an old question
Posted on: 10/31/16 04:59PM
It's been four years and this "eventual fix" has never been completed... Tags still grab deleted images and add them to the count.

Jerl Group: Administrator's Pet - Total Posts: 4345
Posted on: 10/31/16 05:22PM
It's fixed in development versions, or at least on the branch I work on.

Actually implementing the fix on the live site is something that'll take a while. For one, we would need to force a recount of every single tag on every single post, which is a process that would take the site down (or at least in safe-mode where nothing can get uploaded and no tags can be changed) for a considerable amount of time. For now, the best way to see the actual count for a tag is to query the API:{put the tag here}

add_replyAdd Reply