Comment 8 for bug 869824

Revision history for this message
William Grant (wgrant) wrote :

I experimented with rewriting the query to use trigram indices for substring matching. The temp_* indices in https://pastebin.canonical.com/74853/ are new, https://pastebin.canonical.com/74853/ is a code diff to use them, and https://pastebin.canonical.com/74852/ is an example of the final query. It works fine (hundreds of milliseconds) for obscure strings like 'pcman', but strings with common trigrams like 'program' end up spending a couple of seconds in the GIN trigram indices. I suspect that proper FTI would be substantially faster.