mirror of
https://github.com/discourse/discourse.git
synced 2025-02-11 05:44:59 +00:00
Long posts may have `cooked` fields that produce tsvectors longer than the maximum size of 1MiB (1,048,576 bytes). This commit uses just the first million characters of the scrubbed cooked text for indexing. Reducing the size to exactly 1MB (1_048_576) is not sufficient because sometimes the output tsvector may be longer than the input and this gives us some breathing room.