Re: nulls in GIN index

From: Andreas Joseph Krogh <andreas(at)visena(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: nulls in GIN index
Date: 2014-08-11 15:13:58
Message-ID: VisenaEmail.2a.8edce5afe0de16c5.147c5a0b718@tc7-on
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

På mandag 11. august 2014 kl. 11:17:56, skrev worthy7 <worthy(dot)vii(at)gmail(dot)com
<mailto:worthy(dot)vii(at)gmail(dot)com>>: Perhaps I'm missing something

Table has 2 columns, text and ftstext

text: "how are you"
ftstest: (nothing)

Because "how" and "are" and "you" are too common to be tsvectored. Which is
fine.

So if a user searches for "how are you":
select * from tbl_lines WHERE
ftstext @@ plainto_tsquery('English', 'how are you')

Returns nothing. Which I somewhat understand, but I want it to return all
the rows with nothing in the ftstext.
plainto_tsquery('English', 'how are you') = ''
and the ftstext of some rows is also = ''
So why doesn't the index return all these rows when a null string is
searched.

I think you can see what im trying to achieve, how do I do it?   Use the
'simple' dictionary:   my_fts_column @@ to_tsquery('simple', 'how are you')   --
Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963
andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com> www.visena.com
<https://www.visena.com> <https://www.visena.com>  

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2014-08-11 15:15:18 Re: Hokey wrong versions of libpq in apt.postgresql.org
Previous Message Kevin Grittner 2014-08-11 14:40:10 Re: Proposal to add a QNX 6.5 port to PostgreSQL