Something funny going on with my full text search.. and I have no idea what.
I have a receiver called "Ana", this is her tsv column:
'38651000000':4 'aceventura@xxxxxxxxxxxxxx':3B 'ana':1A 'novak':2A
This queries do not find her:
SELECT * FROM receivers r WHERE r.tsv @@ to_tsquery(unaccent('a:*'));
SELECT * FROM receivers r WHERE r.tsv @@ to_tsquery(unaccent('an:*'));
This does:
SELECT * FROM receivers r WHERE r.tsv @@ to_tsquery(unaccent('ana:*'));
Now to an even more interesting part: I have 3 people with last name
"Novak" and one with name "Nov"
This query finds all 4:
SELECT * FROM receivers r WHERE r.tsv @@ to_tsquery(unaccent('n:*'));
This finds NONE:
SELECT * FROM receivers r WHERE r.tsv @@ to_tsquery(unaccent('no:*'));
This finds all 4 again:
SELECT * FROM receivers r WHERE r.tsv @@ to_tsquery(unaccent('nov:*'));
..and this finds all with the last name only:
SELECT * FROM receivers r WHERE r.tsv @@ to_tsquery(unaccent('nova:*'));
These are the TSV columns of last name:
"'38651000000':4 'janez':1A 'janeznovak@xxxxxxxxxxxxxx':3B 'novak':2A"
"'38651000000':4 'aceventura@xxxxxxxxxxxxxx':3B 'ana':1A 'novak':2A"
"'38651000000':4 'novak':2A 'tine':1A 'tnovak@xxxxxxxxxxxxxx':3B"
"'21415000000':4 'alen.nova@xxxxxxxxxxx':3B 'allan':1A 'novak':2A"
And the first name:
"'38651604724':6 'brez':3A 'list':4A 'nov':1A
'novreceiver101@xxxxxxxxxxxxxx':5B 'receiv':2A"
What is going on here?
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general