pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #18208: ts_headline MinWords and MaxWords cannot be set to the same value
2+ messages / 2 participants
[nested] [flat]
* BUG #18208: ts_headline MinWords and MaxWords cannot be set to the same value
@ 2023-11-20 14:04 PG Bug reporting form <noreply@postgresql.org>
0 siblings, 1 reply; 2+ messages in thread
From: PG Bug reporting form @ 2023-11-20 14:04 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: oliverfwales@gmail.com
The following bug has been logged on the website:
Bug reference: 18208
Logged by: Oli
Email address: oliverfwales@gmail.com
PostgreSQL version: 12.16
Operating system: aarch64-unknown-linux-gnu
Description:
Setting MaxWords and MinWords to the same value (e.g. 30) in the options of
ts_headline throws the error "MinWords should be less than MaxWords". Is
there any reason why they must be different? Why not allow setting them to
the same value to allow a fixed number of words to be returned?
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #18208: ts_headline MinWords and MaxWords cannot be set to the same value
@ 2023-11-20 15:10 Tom Lane <tgl@sss.pgh.pa.us>
parent: PG Bug reporting form <noreply@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2023-11-20 15:10 UTC (permalink / raw)
To: oliverfwales@gmail.com; +Cc: pgsql-bugs@lists.postgresql.org
PG Bug reporting form <noreply@postgresql.org> writes:
> Setting MaxWords and MinWords to the same value (e.g. 30) in the options of
> ts_headline throws the error "MinWords should be less than MaxWords". Is
> there any reason why they must be different? Why not allow setting them to
> the same value to allow a fixed number of words to be returned?
[ shrug... ] I'd turn that around: why would that be a good idea?
Usually, you want quite a bit of room between MinWords and MaxWords
to allow a more-or-less-apropos text snippet to be returned.
It seems highly unlikely that the calling query knows enough about
the right snippet length (in advance of knowing the match) to get
good results by demanding an exact length.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2023-11-20 15:10 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-11-20 14:04 BUG #18208: ts_headline MinWords and MaxWords cannot be set to the same value PG Bug reporting form <noreply@postgresql.org>
2023-11-20 15:10 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox