Re: Comparing tsvector results

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Comparing tsvector results
Дата
Msg-id CAKFQuwZe=eT4p7LqeqqeT2fcGTGc7FL6H9pAZssSUw8wgUjQDg@mail.gmail.com
обсуждение исходный текст
Ответ на Comparing tsvector results  (Liza Sazonova <liza@getpitstop.io>)
Ответы Re: Comparing tsvector results  (Liza Sazonova <liza@getpitstop.io>)
Список pgsql-general
On Thu, Jun 16, 2016 at 2:21 PM, Liza Sazonova <liza@getpitstop.io> wrote:
Hello,

I'm trying to implement a keyword-based search on my database. 

I have some text input (Say, "The A or B and C with D") and a list of keywords ("B","X","Y"). I want to identify which keywords are present in the text input. I also want to use a thesaurus to process the text input, since the keywords have synonyms (for example, "The A : X"). 

As far as I understand, the only way for me to process text input with a thesaurus would be to use tsvector / tsquery; or at least this is the fastest way. 
Is it possible to retrieve the tsvector from the text input, then retrieve the tsvector from the keyword list, and identify which words are present in both?

 
From its description the tsvector_to_array function sounds like it would be helpful here.

​tsvector_to_array(input) -> unnest
intersect
tsvector_to_array(keywords) -> unnest

​David J.​

В списке pgsql-general по дате отправления:

Предыдущее
От: Durgamahesh Manne
Дата:
Сообщение: Re: Re: regarding schema only migration from sqlserver to postgres with runmtk.sh
Следующее
От: Liza Sazonova
Дата:
Сообщение: Re: Comparing tsvector results