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 'acevent...@mailinator.com':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 'janezno...@mailinator.com':3B 'novak':2A"
"'38651000000':4 'acevent...@mailinator.com':3B 'ana':1A 'novak':2A"
"'38651000000':4 'novak':2A 'tine':1A 'tno...@mailinator.com':3B"
"'21415000000':4 'alen.n...@gmailer.com':3B 'allan':1A 'novak':2A"

And the first name:
"'38651604724':6 'brez':3A 'list':4A 'nov':1A 'novreceiver...@mailinator.com':5B 'receiv':2A"


What is going on here?



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to