Re: [GENERAL] Combine multiple text search configuration

Поиск
Список
Период
Сортировка
От Johannes Graën
Тема Re: [GENERAL] Combine multiple text search configuration
Дата
Msg-id 9b1cef68-0652-84b0-15b7-9ab20495ee94@selfnet.de
обсуждение исходный текст
Ответ на [GENERAL] Combine multiple text search configuration  (hmidi slim <hmidi.slim2@gmail.com>)
Ответы Re: [GENERAL] Combine multiple text search configuration
Список pgsql-general
Hi,


On 2017-11-06 09:17, hmidi slim wrote:
> Hi,
> I want to know if I can combine multiple text search configurations when
> I tried to use FTS.
> Is there any options like this:
> *to_tsvector(['english', 'french'], document)*
> *
> *
> Trying to create a new text configuration:
> *Create text search configuration test (copy=simple)*
> *Alter text search configuration test*
> *add mapping for asciiword with english_stem,french_stem*
> *
> *
> This query doesn't work. How can I combine multiple text search
> configurations if I need more than one into my query to search a word?

what about using two indexes, one for each language? If your documents
can either be English OR French, the English OR the French vector should
match an English OR French tsquery.

It is not clear to me how combining two stemmers should practically work
since each word can only have one stem. If you have multilingual
documents or texts with code switching, you could also try combining the
two vectors both for the documents and the query:

(to_tsvector('english', document) || to_tsvector('french', document)) @@
(to_tsquery('english', query) || to_tsquery('french', query))



-- 
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 по дате отправления:

Предыдущее
От: Johannes Graën
Дата:
Сообщение: Re: [GENERAL] Combine multiple text search configuration
Следующее
От: David Pacheco
Дата:
Сообщение: [GENERAL] postmaster deadlock while logging after syslogger exited