userstyles-world / userstyles.world

⭐ Website to browse and share UserCSS userstyles. A modern replacement for UserStyles.org made by the userstyles community.
https://userstyles.world
GNU Affero General Public License v3.0
322 stars 15 forks source link

SQLite FTS Query Syntax is not working as expected #227

Closed astyled closed 1 year ago

astyled commented 1 year ago

After search rewrite in SQL, it was advised to use this syntax. However, it is not that useful when AND only works with the words standing near each other.

Additional context: trigram tokenizer.

vednoc commented 1 year ago

For more context, @a0eoc searched for "debloat AND vk". As noted in https://sqlite.org/fts5.html#the_trigram_tokenizer, substring has to be three or more unicode characters. We could check the length of search keyword and show an error if that requirement isn't met. Additionally, we might want to show a similar error when advanced search syntax is used but no results are returned.