pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #16499: Escape Characters in FTS
2+ messages / 2 participants
[nested] [flat]
* BUG #16499: Escape Characters in FTS
@ 2020-06-18 06:31 PG Bug reporting form <noreply@postgresql.org>
2020-06-18 15:49 ` Re: BUG #16499: Escape Characters in FTS Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: PG Bug reporting form @ 2020-06-18 06:31 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: chirag.gupta1@globallogic.com
The following bug has been logged on the website:
Bug reference: 16499
Logged by: Chirag Gupta1
Email address: chirag.gupta1@globallogic.com
PostgreSQL version: 9.6.0
Operating system: Windows
Description:
Hi,
We are using FTS to implement search and there is a scenario where we have a
word say "IVR@#1", when I search for "1" there should not be any result as
per user perspective.
It seems special characters are replaced by spaces/blanks. Is there any way
to include Special characters in search? Kindly let us know through this
channel as earliest possible.
Regards
Chirag Gupta
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #16499: Escape Characters in FTS
2020-06-18 06:31 BUG #16499: Escape Characters in FTS PG Bug reporting form <noreply@postgresql.org>
@ 2020-06-18 15:49 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2020-06-18 15:49 UTC (permalink / raw)
To: chirag.gupta1@globallogic.com; +Cc: pgsql-bugs@lists.postgresql.org
PG Bug reporting form <noreply@postgresql.org> writes:
> We are using FTS to implement search and there is a scenario where we have a
> word say "IVR@#1", when I search for "1" there should not be any result as
> per user perspective.
> It seems special characters are replaced by spaces/blanks. Is there any way
> to include Special characters in search? Kindly let us know through this
> channel as earliest possible.
You would need to implement your own text search parser that classifies
"IVR@#1" as a single token. That's certainly do-able, but it's not
exactly trivial. The built-in parser doesn't have any ability to be
reconfigured to apply different tokenization rules: it just does
what's described at
https://www.postgresql.org/docs/current/textsearch-parsers.html
On the bright side, it sounds like you might not care too much
about URLs or hyphenated words, in which case your custom parser
could be far simpler than the built-in one. There is a skeleton
parser in our source tree at src/test/modules/test_parser/ that
might help you get started.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2020-06-18 15:49 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-06-18 06:31 BUG #16499: Escape Characters in FTS PG Bug reporting form <noreply@postgresql.org>
2020-06-18 15:49 ` 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