model-writtenrun 3905 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Ngigi Waithaka reported in 2018 that ts_headline highlighted individual query words outside the phrase matched by the <-> operator #1, and Alex Malek confirmed the behavior in PostgreSQL 14.4 in 2022 #2.
- Bruce Momjian revisited the report in October 2023 and demonstrated highlighting even when the document lacked the requested phrase #3; Tom Lane explained that fragment selection considers the query, but highlighting includes all matching words and cannot always satisfy phrase or fragment-length constraints #4.
- Pavel Borisov proposed documenting the feature as deprecated because its loose semantics repeatedly surprised users #5, but Bruce chose to clarify the documentation first #6 #7.
- Tom objected that Bruce's initial patch incorrectly promised fragments satisfying the query, since neither the input document nor a suitably short fragment necessarily matches #8; Bruce revised that promise to selecting relevant fragments #9.
- Tom supplied more precise wording separating fragment selection from word highlighting #10, which Bruce incorporated into the final attachment #11.
- Tom approved the final patch and explained that ts_headline predates phrase search; a deeper redesign could require changing both its algorithm and control parameters, but no such implementation was proposed here #12.
- Bruce committed the final attachment #11 unchanged as 24943fba46, with PostgreSQL 16 backport f5b75be030, and closed the thread by confirming application back through PostgreSQL 16 #13; highlighting behavior remained unchanged.