doc: clarify handling of ts_headline() operators & extra words
authorBruce Momjian <[email protected]>
Mon, 13 Nov 2023 21:35:55 +0000 (16:35 -0500)
committerBruce Momjian <[email protected]>
Mon, 13 Nov 2023 21:35:55 +0000 (16:35 -0500)
Reported-by: Ngigi Waithaka & Alex Malek
Bug: 15172

Discussion: https://postgr.es/m/152461454026.19805.6310947081647212894@wrigleys.postgresql.org

Backpatch-through: 16

doc/src/sgml/textsearch.sgml

index 1550be5695071bb8328a69700ad00648e7ae177d..a7767049c8c1b06ac3352444c7ae4e40bd3f2753 100644 (file)
@@ -1287,7 +1287,10 @@ ts_headline(<optional> <replaceable class="parameter">config</replaceable> <type
    <para>
     <function>ts_headline</function> accepts a document along
     with a query, and returns an excerpt from
-    the document in which terms from the query are highlighted.  The
+    the document in which terms from the query are highlighted.
+    Specifically, the function will use the query to select relevant
+    text fragments, and then highlight all words that appear in the query,
+    even if those word positions do not match the query's restrictions.  The
     configuration to be used to parse the document can be specified by
     <replaceable>config</replaceable>; if <replaceable>config</replaceable>
     is omitted, the