Search
Venator supports server-side search, which allows clients to search for messages without having to store all of them locally. This works great for most cases, however has a few known downsides, namely:
- The server (obviously) cannot search encrypted rooms.
- Storing the text to search negates Venator’s database compression techniques, which will cause excessive storage usage as rooms age.
- Performing search can be a complex operation that weights on both the database and the server. Protections are in place to mitigate the problem as much as possible, but it will always be possible to cause strain on the server by requesting excessive and complicated searches.
Due to the above, and generally infrequent usage of server-side search, it is disabled by default. Due to limitations with the database system, server-side search further only supports the English lexicon (other languages will still work, but results may be less relevant).
Enabled
enabled: Whether server-side full text search indexing is enabled. Defaults to false.
If set to true, event content will be added to the full-text search index immediately after applying this
configuration.
Old events will not automatically be indexed - you need to use the admin API (TODO) for that. Likewise, disabling FTS will not clear the existing index. That can also be done via the admin API.
Example:
search:
enabled: true
Parse HTML
parse_html: If true, HTML-formatted content will be converted into plain-text and additionally added to the index.
By default, only the body (plain-text content) of a message is added to the index, if it is non-empty. Some clients
may send different body and formatted_body contents, which would make searching for them difficult. For example,
some bots choose not to provide plain-text representations of their messages if they’re difficult to convert,
which means the server would only index “no alternative text available”, and not the actual rendered HTML that the user
would see (and potentially try to search for).
If parse_html is true, the server attempts to convert messages with the format of org.matrix.custom.html to
plain text and then adds them to the index if they’re non-empty. body is always added regardless of this setting.
Warning
Since
bodyis always stored, this means the storage cost of the search index will typically be doubled!
Example:
search:
parse_html: true