Now I will learn about full-text search in PostgreSQL 9.2.3. However, I have a problem. I ran this example:
CREATE TABLE messages (title text,body text,tsv tsvector); CREATE TRIGGER tsvectorupdate BEFORE INSERT OR UPDATE ON messages FOR EACH ROW EXECUTE PROCEDURE tsvector_update_trigger(tsv, 'pg_catalog.english', title, body); INSERT INTO messages VALUES('title here', 'the body text is here');
Unfortunately, after:
SELECT title, body FROM messages WHERE tsv @@ to_tsquery('title & body')
I do not get the result - 0 rows are returned. Could you tell me why? According to the PostgreSQL documentation, it should work.
only "titl" and "bodi" as a query get the appropriate result. Why?
source share