1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-09-15 18:57:04 +00:00

Set arbitrary maximum size for tsvector column

- The max size for tsvector is 1 MiB
- We index only the first million of characters,
  it should be enough for most feed entries.
This commit is contained in:
Frédéric Guillot 2018-10-19 21:40:59 -07:00
parent 715575001a
commit a614f98063
3 changed files with 6 additions and 6 deletions

View file

@ -1,3 +1,3 @@
alter table entries add column document_vectors tsvector;
update entries set document_vectors = to_tsvector(title || ' ' || coalesce(content, ''));
update entries set document_vectors = to_tsvector(substring(title || ' ' || coalesce(content, '') for 1000000));
create index document_vectors_idx on entries using gin(document_vectors);