I have just stumbled over a weird behaviour in postgres ts_headline function (used for highlighting fulltext search results).
First I thought the simple dictionary does not play with highlighting as the below example shows (there should be <b>
tags):
# SELECT ts_headline('simple', 'This is artificial text', to_tsquery('artificial'));
ts_headline
-------------------------
This is artificial text
(1 row)
But a different word works fine...
# SELECT ts_headline('simple', 'some Word in', to_tsquery('Word'));
ts_headline
---------------------
some <b>Word</b> in
(1 row)
Does anybody have an explanation for this behaviour?