Skip to content

Search Results for Tags Not Working as Expected with a Large Number of Tags #23978

Open

Description

@alinclamba

When a site has a large number of tags (4,470+), certain tags do not appear in search results as expected. For example, while similar tags are displayed correctly, specific tags are missing from the results, even though they exist on the site. This issue seems to be related to the volume of tags rather than the tags themselves.

This was reported by a user in Zendesk: 9258078-zd-a8c
Mentioned in Slack as well: p1736530234720379-slack-C06NXHR5WQ1

Activity

  1. dangermattic commented on Jan 14, 2025

    @dangermattic
    Collaborator

    Thanks for reporting! 👍

  2. added
    [Status] Close CandidateTriage suggests this can be closed; see the latest comment for why and what's left.
    [Status] Needs TestingNeeds to be confirmed on a device or simulator.
    on Oct 31, 2026
  3. jkmassel commented on Oct 31, 2026

    @jkmassel
    Contributor

    This is likely fixed by the rebuilt tags list in #24668, #24670 and #24674. #24668 rewrote it specifically because not all tags were shown and search results were inaccurate on sites with many tags. It now uses the core REST tags endpoints (#24665).

    To verify: on a site with hundreds of tags, search for a tag that is far down the list, in both the post tag picker and Site Settings > Tags.


    Generated by Claude Code

  4. added
    Simulator TestableCheckable on a simulator. Steps are in the issue body or the comment headed 'Simulator test plan'.
    on Oct 31, 2026
  5. jkmassel commented on Oct 31, 2026

    @jkmassel
    Contributor

    Simulator test plan. Sign in using docs/simulator-sign-in.md. Build from current trunk.

    Setup: WordPress.com token, and a test site seeded with 500 or more tags through the REST API, for example tag-0001 to tag-0600.

    1. In a post, open Tags and search for a tag near the end, such as tag-0587.
    2. Do the same in Site Settings > Tags.

    Pass: the tag is found in both places, and the full list scrolls through every tag.


    Generated by Claude Code

  6. jkmassel commented on Oct 31, 2026

    @jkmassel
    Contributor

    Repro run (2026-10-30, trunk e64c851, iPhone 18 Pro simulator / iOS 27.0, Jetpack Debug)

    Result: Fixed on trunk ✅. Recommend closing.

    Steps (exact, minimal):

    1. Post tag picker: on a local self-hosted site with 600 tags, open a post's Post Settings > Tags and search for tag-0587.
    2. Site Settings > Tags: on a WordPress.com site with 4,641 tags, search for a tag about 4,600 places down the alphabetical list.

    Expected / actual: As expected. Both searches found the tag. On the local site this was a server search: GET /wp-json/wp/v2/tags?context=view&per_page=100&search=tag-0587. On WordPress.com we saw the result but not the request. In the post tag picker the list also loaded pages 1 to 6 while scrolling, which covers all 600 tags.

    Differences from the plan:

    • We read an existing WordPress.com site rather than seeding one, because this run can't write to WordPress.com. Its name and tag aren't given here because it's an internal site.
    • Site Settings > Tags only appears for admins on sites using the WordPress.com API, so it wasn't tested on the local site.
    • We didn't try the post tag picker on WordPress.com, or scroll through all 4,641 tags in Site Settings. Both screens build the same TagsViewModel.tags(for:) (from the code).

    Evidence: the local site's access log and the app's accessibility tree.


    Generated by Claude Code

  7. removed
    Simulator TestableCheckable on a simulator. Steps are in the issue body or the comment headed 'Simulator test plan'.
    on Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions