Bug: person search by distinct_id fails on /search page
@adamleithp is already working on this.
Since Jan 22, 2026.
- Dominant language
- Python
- Stars
- 39.9k
- Forks
- 3.4k
- Avg merge
- 6h 51m
- Merged PRs (30d)
- 232
Description
Bug Description
Bug description
Searching by distinct_id on the /project/*/search page returns no results, even when the person exists.
When a user navigates directly to the search page (e.g., https://eu.posthog.com/project/114428/search) and searches for a person's distinct_id, no results are returned if the person has an email/name property that doesn't contain that distinct_id.
Important: This bug ONLY affects the search page at /project/*/search. It does NOT affect:
- The Cmd+K / sidebar search popup/modal
- The
/personspage search
Example:
- Person has
distinct_id: "test_bug_xyz789"andemail: "alice@example.com" - Searching for
"test_bug_xyz789"on/project/*/search: No results - Searching for
"test_bug_xyz789"on/persons: Person found - Searching via Cmd+K popup: Person found
How to reproduce
Prerequisites (if you don't already have a user that meets the criteria):
- Ensure you do NOT have the
NEW_SEARCH_UXfeature flag enabled - Create a person with an email/name that doesn't contain the distinct_id:
curl -X POST https://eu.posthog.com/capture/ \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY", "distinct_id": "test_bug_xyz789", "event": "test_event", "properties": { "$set": { "email": "alice@example.com", "name": "Alice Smith" } } }'
Steps:
Navigate directly to: https://eu.posthog.com/project/YOUR_PROJECT_ID/search
In the search box, type: test_bug_xyz789 (the exact distinct_id)
Look for the "Persons" section in search results
Expected: Person "Alice Smith" should appear in results
Actual: No "Persons" section appears, or it's empty
Verify the person exists:
Go to /persons?search=test_bug_xyz789
Result: Person appears correctly (proves backend search works)
Verify Cmd+K search works:
Press Cmd+K (or click search in sidebar)
Type: test_bug_xyz789
Result: Person appears correctly (popup search doesn't have the bug)
Additional context
From: https://posthoghelp.zendesk.com/agent/tickets/47626 (moved to PostHog: https://us.posthog.com/project/2/support/tickets/50131)
Debug info
Kind: bug
Target area: customer_analytics
Report event: http://go/ticketByUUID/133749ab-67b2-420c-8a5c-7fb20cb8b502
Session: https://us.posthog.com/project/sTMFPsFhdP1Ssg/replay/019bda1a-9bd7-7c12-9143-69d20cb1f1ea?t=166
Exceptions: https://us.posthog.com/project/2/error_tracking?filterGroup=%7B%22type%22%3A%22AND%22%2C%22values%22%3A%5B%7B%22type%22%3A%22AND%22%2C%22values%22%3A%5B%7B%22key%22%3A%22%24session_id%22%2C%22value%22%3A%5B%22019bda1a-9bd7-7c12-9143-69d20cb1f1ea%22%5D%2C%22operator%22%3A%22exact%22%2C%22type%22%3A%22event%22%7D%5D%7D%5D%7D
Location: https://eu.posthog.com/project/5891/search?search=sea
Persons-on-events mode for project: person_id_override_properties_joined
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.