element-hq / element-hq/synapse
Searching channel messages does not find all matching messages (substring match for flag_check inside flag_check.exe ?)
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
### Description
Re-filed from https://github.com/element-hq/element-web/issues/29365
### Steps to reproduce
1. https://chat.mozilla.org/#/room/#developers:mozilla.org
2. Click info button on the top right
3. Type "flag_check" in the search field
### Outcome
#### What did you expect?
I expected it to find [this message](https://matrix.to/#/!lrZtdjyLpBmoKbMdyx:mozilla.org/$rPzJ40I7clVCt-2StWWXpHcR1mBIuTY2TN5KxUg7ths?via=mozilla.org&via=matrix.org&via=igalia.com).
#### What happened instead?
It doesn't.
### Homeserver
https://mozilla.modular.im/
### Synapse Version
1.124.0
### Installation Method
I don't know
### Database
Unsure
### Workers
I don't know
### Platform
No idea. I don't run the homeserver; I'm simply re-filing the user-experienced issue with the search functionality based on feedback in https://github.com/element-hq/element-web/issues/29365
### Configuration
_No response_
### Relevant log output
```shell
N/A
```
### Anything else that would be useful to know?
The element client POSTs to `_matrix/client/v3/search` with:
```
{"search_categories":{"room_events":{"search_term":"flag_check","filter":{"limit":10,"rooms":["!lrZtdjyLpBmoKbMdyx:mozilla.org"]},"order_by":"recent","event_context":{"before_limit":1,"after_limit":1,"include_profile":true}}}}
```
and the resulting response does not contain the message linked above.
Contributor guide
Research direction
Start by reproducing the POST to _matrix/client/v3/search with search_categories.room_events.search_term set to "flag_check" and the reported room filter. Trace the server-side search handling to determine why the linked message is omitted, then verify that substring matches such as flag_check inside flag_check.exe are returned without breaking existing search behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100