[MDEV-30599] Trigram indexes: faster text searching Created: 2023-02-07 Updated: 2023-02-07 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Full-text Search |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor |
| Reporter: | Oliver Jones | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Description |
|
Feature request: Add a trigram style of index. Implemented correctly, they'll make predicates such as column LIKE '%string%' sargable, and make a big difference to performance. Predicates like that show up all over the place in running code – for example the search-box function in WordPress uses them. I propose syntax like CREATE INDEX index_name USING TRIGRAM ON tbl(col1,col2); PostgreSQL has an elaborate extension-based trigram indexing system. Not all that stuff is necessary to get the text search benefits. Writeup here. |