Skip to content

[Bug]: Message search scans miss smart apostrophes #36831

Closed

Description

@StiensWout

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Send a user message containing 部署 John’s service after migration in a thread.
  2. Search threads for John’s: the thread appears.
  3. Search for 部署 John’s or 部署 John's.

The two-character Chinese word selects the supported message-scan path even with the search index present. The same mismatch affects ordinary Latin queries such as gannet's against gannet’s nest when FTS is unavailable.

Expected behavior

The thread appears with either apostrophe spelling, including when search scans messages. Its snippet retains the apostrophe the user wrote.

Actual behavior

Search shows no matching thread. The SQL candidate filter checks raw apostrophes before the shared matcher can apply apostrophe equivalence.

Impact

Minor bug or occasional failure

Version or commit

Reproduced on upstream main 2eb8829308fff5ec59bc1573663f88f25a1037f3; independent Claude Opus 5.5 verification on 0d585f77107a58539d03e52e9ecefec74ad409db. Also reproven against the latest pre-filing base recorded in the companion PR.

Environment

Linux, isolated T3 server and web client, Replay (dev) fixture. Provider-independent server search behavior. No release-frequency claim.

Logs or stack traces

The public ThreadSearch.search test returns [] for an existing matching thread when scanning curly-apostrophe text. Indexed single-token controls and straight-stored controls pass.

Screenshots, recordings, or supporting files

Search misses the stored message

Workaround

With an index available, omit the short CJK word and search for John’s alone.

Activity

  1. added
    vouch:trusted
    on Nov 14, 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

    Labels

    vouch:trusted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions