Re: Slides for PGCon2016; "FTS is dead ? Long live FTS !" - Mailing list pgsql-general

From Oleg Bartunov
Subject Re: Slides for PGCon2016; "FTS is dead ? Long live FTS !"
Date
Msg-id CAF4Au4xecgDUG6x1fKXsCzQdZgjo9kSTdwtzRQee97cvTpjAMA@mail.gmail.com
Whole thread Raw
In response to Re: Slides for PGCon2016; "FTS is dead ? Long live FTS !"  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
List pgsql-general
On Sun, May 29, 2016 at 10:04 PM, Karsten Hilbert
<Karsten.Hilbert@gmx.net> wrote:
>>> I submitted slides to pgcon site, but it usually takes awhile, so you can
>>> download our presentation directly
>>> http://www.sai.msu.su/~megera/postgres/talks/pgcon-2016-fts.pdf
>
> Looking at slide 39 (attached) I get the impression that I
> should be able to do the following:
>
>
> - turn a coding system (say, ICD-10) into a dictionary
>   by splitting the terms into single words
>
>         say, "diabetes mellitus -> "diabetes", "mellitus"
>
> - define stop words like "left", "right", ...
>
>         say, "fracture left ulna" -> the "left" doesn't
>         matter as far as coding is concerned
>
> - also turn that coding system into queries by splitting
>   the terms into single words, concatenating them
>   with "&", and setting the ICD 10 code as tag on them
>
>         say, "diabetes mellitus" -> "diabetes & mellitus [E11]"
>
> - run an inverse FTS (FQS) against a user supplied string
>   thereby finding queries (= tags = ICD10 codes) likely
>   relevant to the input
>
>         say, to_tsvector("patient was suspected to suffer from diabetes mellitus")
>         -> tag = E11
>
>
> Possible, not possible, insane, unintended use ?

why not, it's the same kind of usage I used at slide #39.

create table icd10 (q tsquery, code text);
insert into icd10 values(to_tsquery('diabetes & mellitus'), '[E11]');
select * from icd10 where to_tsvector('patient was suspected to suffer
from diabetes mellitus') @@ q;
           q           | code
-----------------------+-------
 'diabet' & 'mellitus' | [E11]
(1 row)



>
> Thanks,
> Karsten
> --
> GPG key ID E4071346 @ eu.pool.sks-keyservers.net
> E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>


pgsql-general by date:

Previous
From: Sridhar N Bamandlapally
Date:
Subject: Re: UUID datatype
Next
From: Brian Sutherland
Date:
Subject: After replication failover: could not read block X in file Y read only 0 of 8192 bytes