|
|
|
|
|
by agconti
3089 days ago
|
|
Absolutely. - Using a `SearchVectorField` is a must after 500K rows. - Make keeping this field up to date easy for yourself by populating it using `SeachVector` with a Django pre_save signal or PostgreSQL trigger. This reduces CPU utilization significantly as the parsing and tokenization of the field your searching on is done a head of time. - Adding a GIN Index on your `SearchVectorField` column will improve performance dramatically. - You should specify your language configuration for postgres FTS parser. The default parser doesn't do much. It just removes spaces and normalize case. Specifying a language lets the parser make heavier optimizations that noticeably improve performance and the quality of results. If you need support for more then one langue, Django already makes it easy for this configuration to be dynamic. |
|