synapse icon indicating copy to clipboard operation
synapse copied to clipboard

Search for URLs in messages doesn't return any results

Open matrixbot opened this issue 2 years ago • 1 comments

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

matrixbot avatar Dec 16 '23 08:12 matrixbot

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

bkil avatar May 10 '24 10:05 bkil