Full Text Search PostgreSQL

Full Text Search PostgreSQL

Ben Awad

5 лет назад

72,160 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

MH
MH - 14.08.2023 22:45

use plainto_tsquery instead of to_tsquery, because to_tsquery does not escape the sql letters like ', \, !, so the query can be easily injected

Ответить
Виктор Александрович
Виктор Александрович - 02.08.2023 18:51

if we need to use search on 2 tables then how to build an index in this case.
pls help <3

Ответить
Pearce Merritt
Pearce Merritt - 28.04.2023 02:52

very helpful, thanks!

Ответить
Levar Berry
Levar Berry - 25.03.2023 01:36

OMG when you brought up TypeORM it was like a surprise celebrity showing up. SO COOL! I feel like this made just me. Was trying to also figure ElasticSearch for our TypeORM/Postgres setup. This is perfect!

Ответить
LL Dad B
LL Dad B - 06.02.2023 19:23

Right to the point with great examples. Thanks!

Ответить
Seth Moeckel
Seth Moeckel - 01.11.2022 19:31

Postgres Generated columns would be really useful for generating search documents as changes are made. Its also a bit simpler than triggers.

Ответить
Lakshyaraj Dash
Lakshyaraj Dash - 28.10.2022 16:14

Great explanation.. saved a lot of time that I wasted searching over the internet.

Ответить
SeriousM4x
SeriousM4x - 17.10.2022 19:45

i was just looking up this topic, clicked on the video and half way though realised its from ben

Ответить
Kỳ Thịnh Nguyễn
Kỳ Thịnh Nguyễn - 12.10.2022 09:35

very usefull, thank you.

Ответить
Eduard mart
Eduard mart - 23.05.2022 10:39

How do you add these indexes automatically on insert or update?

Ответить
Kerod Fresenbet Gebremedhin
Kerod Fresenbet Gebremedhin - 23.04.2022 19:09

trigrams

Ответить
Anh Đặng Tuấn
Anh Đặng Tuấn - 24.03.2022 17:52

You're doing great. Keep going! Thank you very much

Ответить
Abel Huaranca
Abel Huaranca - 05.02.2022 21:14

EXCELLENT LESSON, PERFECT, SUBLIME, THANKS THANKS BEN AWAD!!!! A HUUUUUUUUUUUUUUUUGE THANKS!!!!! :D

Ответить
Simpely Samosa
Simpely Samosa - 05.02.2022 15:58

MySQL vs PSQL please

Ответить
Sergey Starodubtsev
Sergey Starodubtsev - 17.11.2021 02:33

I noticed that using tvector make search 2 times slower comparing to "and (like '%abc%' or like '%bcd%'), on top of this tvector performance is not stable, sometimes its say 6 seconds, sometimes 11 seconds to get the response

Ответить
Leandro Gripp
Leandro Gripp - 29.09.2021 14:44

A little late, but does anyone know how can i implement something like the initial example, that searches a bunch of keywords? The behavior I want is to get every result that matches at least one of the keywords, but ordered by number of matches (and if possible, still considering the given weights for the fields, as a match in the title is still more valuable than a match in the description)

Ответить
Antônio Sousa
Antônio Sousa - 13.09.2021 14:10

You are the man.

Ответить
Birhanu
Birhanu - 31.08.2021 10:28

I like how you followed start simple finish master approach. Thank you for your awesome contents once again!

Ответить