[BUG] Tags that have been merged are not included in search

Posts: 6 · Views: 117
  • 26569

    I'm seeing an issue with wallpapers that have had tags merged. For example:

    1. wallpaper X has tag "tree"
    2. "tree" is merged with "trees"
    3. wallpaper X now shows tag "trees"
    4. when searching for "trees", wallpaper X is not included

    I suspect (although this could be wrong) that when the tags are being merged a cache isn't being purged/updated. The issue affects both the regular site search and the API.

    The workaround I've found is to remove the tag from the wallpaper and re-add it. This seems to force update the cache.

  • 26570

    It takes a while for the wallpapers to update in "Search". Wallpapers with less traffic update more rarely, but ultimately all wallpapers will be updated with both of the tags in "Search".

  • 26571

    I've tracked this for a few wallpapers. I've seen it not update for days or even weeks. Normally I expect the cache to update in a few minutes, which it often does when adding a tag. However, when the tags are merged by an admin the cache doesn't update.

    Added 11 minutes after

    A working example for you:

    loading
    3000 x 223620

    This wallpaper has the tag Gisele Bundchen. You can see it in the list on the page. It also appears in the API query for that wallpaper: https://wallhaven.cc/api/v1/w/lqq15q

    Interestingly, the wallpaper even appears on the tag main page (https://wallhaven.cc/tag/22884).

    I know this tag was recently merged, but unfortunately I can't access what the old tag ID was.

    But when I search with:

    1. https://wallhaven.cc/search?q=id:22884&categories=111
    2. https://wallhaven.cc/api/v1/search?q=id:22884&categories=111

    that wallpaper doesn't appear in either.

    Last updated
  • 26572

    Sometimes it takes longer than weeks, it depends on the activity of the wallpaper. This example you mentioned has not been refreshed in the database for the past 4 weeks. It just happened a few minutes ago, and as you can see, it now appears in Search, without the need of removing and adding tags.

  • 26573

    I would suggest having a way to manually refresh them after a tag is merged then. 4 weeks of inaccurate search results is pretty terrible to be frank. I mean, I understand it's a wallpaper site not something serving critical information, but still. I can't imagine it would be too difficult to fire off some command that refreshes all the wallpapers with that tag after the merge job is complete.

    There are also 4 more with the same tag that haven't been refreshed. And since the wallpaper linked above now shows the tag at the end of the list instead of the beginning, I wonder if someone just deleted the tag and re-added it, like I suggested as a workaround.

    In either case, I think it's worth looking into. This is only one example I've seen, there are many others.

  • 26576

    MonkeyTyrant said:

    I wonder if someone just deleted the tag and re-added it, like I suggested as a workaround.

    I can assure you that is not the case. It appears at the end of the tag list because that is what merging does, it removes one and adds another (at the end).

Message