synapse
synapse copied to clipboard
Search for URLs in messages doesn't return any results
This issue has been migrated from #3024.
Description
Message text search doesn't work with URL. Even if you search for URL exactly as it was in a message, search will not return any results.
Steps to reproduce
- Post some link in some room, e.g. https://www.youtube.com/watch?v=oHg5SJYRHA0
- Enter the same link in the search box: https://www.youtube.com/watch?v=oHg5SJYRHA0
- Press enter
The search results will not include the message with the link, which is unexpected.
Version information
- Homeserver: self-hosted
- Version: matrix-synapse==0.26.0
- Install method: pip
- Platform: Linux, PostgreSQL 9.6
You can actually search for a URL if you don't include the protocol as long as the path is "simple" and surrounded by the "right" characters. This is a limitation of how the tokenizer/indexer works, as described in: https://github.com/bkil/wiki/blob/master/en/dev/matrix-full-text-search.md
Related to #12609 #1426