to_tsvector Nedir? - Text to tsvector Type
Açıklaması şöyle
We can use the to_tsvector to convert any arbitrary text to tsvector similar to how we typecast other data types.
Açıklaması şöyle
The `to_tsvector` function tokenizes the text, removes stop words, applies stemming (reducing words to their root form), and assigns weights to the tokens based on their importance. The resulting `ts_vector` object is a sorted list of lexemes with their respective positions and weights. For example, the text “The quick brown fox” in English might be represented as a `ts_vector` like this: `’brown’:3 ‘fox’:4 ‘quick’:2`.
Örnek
Şöyle yaparız ve çıktı olarak şunu alırız
SELECT to_tsvector('the cat got scared by a cucumber'); 'car':2 'cucumb':7 'got':3 'scare':4
Hiç yorum yok:
Yorum Gönder