Please help me to understand how to change words delimiter when I use gin index. The problem is that "," ";" and " " signs are words delimiters but the "." isn't. So in phrase "Some 11.22.33.44 IP" I am able to find "Some" "11.22.33.44" "IP" words. When I am looking for "33" – unable to find it. Many thanks for the help.
PostgreSQL full text search words delimiter
full-text-searchpostgresql
Related Question
- SQL Server Full-Text Search – Can It Tokenize Words Within Words?
- Postgres Full Text Search with Better Match – How to Optimize
- Mysql – How to search for compound words, and get the word parts returned
- PostgreSQL – Full Text Search with Hyphenated Terms
- Postgresql – Full text search on larger text rows
- MySQL: how to implement a text search without delimiter
- Postgresql – Postgres 12 and full text search against arbitrary key-value pairs
Best Answer
The "natural" way to do this would be to change or write your own text search parser. While it is possible to do that, it is unreasonably difficult.
Do you want both '11.22.33.44' and '33' to show up as individual tokes, or just '33'? If the latter, then maybe just preprocess your data by replacing all '.' with ' ':
Of course you should do the same replacement on the queries as well before passing them to
plainto_tsquery
.