Feature #14573

Updated by Tom Clegg about 3 years ago

See #13752, #14560 for previous attempts.
* Indexing on text fields cannot handle medium-size text inputs.
* Indexing on to_tsvector(...) cannot handle certain large text inputs (limit depends on content, not just size). Result: crash when creating the index or when inserting a row, whichever happens last.

Possible approach:
* Add a tsvector column. Populate it with to_tsvector(...) where possible. Where not possible, either populate with partial content (to_tsvector(substring(...))), or leave it null and adjust the search query to do an unindexed fulltext search on such rows. A function with an "exception clause":https://www.postgresql.org/docs/9.6/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING might work.
* Use something other than Postgresql for text search.

Back