Bird
0
0

How can you customize the highlight tags used by ts_headline to use <mark> instead of <b>?

hard📝 Application Q9 of 15
PostgreSQL - Full-Text Search
How can you customize the highlight tags used by ts_headline to use <mark> instead of <b>?
APass options parameter: <code>'StartSel=<mark>, StopSel=</mark>'</code> to ts_headline.
BChange the configuration from 'english' to 'mark'.
CUse a different function called ts_mark.
DReplace <code><b></code> tags manually after ts_headline.
Step-by-Step Solution
Solution:
  1. Step 1: Know ts_headline options

    ts_headline accepts an options string to customize highlight tags.
  2. Step 2: Identify correct option format

    Use 'StartSel' and 'StopSel' to set custom tags like <mark>.
  3. Final Answer:

    Pass options parameter: 'StartSel=<mark>, StopSel=</mark>' to ts_headline. -> Option A
  4. Quick Check:

    Customize tags with StartSel and StopSel options [OK]
Quick Trick: Use StartSel and StopSel to change highlight tags [OK]
Common Mistakes:
  • Trying to change config name
  • Using non-existent functions
  • Manually replacing tags instead of options

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes