Re: How does the tsearch configuration get selected?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How does the tsearch configuration get selected?
Дата
Msg-id 25520.1181878775@sss.pgh.pa.us
обсуждение исходный текст
Ответ на How does the tsearch configuration get selected?  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: How does the tsearch configuration get selected?  (Oleg Bartunov <oleg@sai.msu.su>)
Re: How does the tsearch configuration get selected?  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> First, why are we specifying the server locale here since it never
> changes:

It's poorly described.  What it should really say is the language
that the text-to-be-searched is in.  We can actually support multiple
languages here today, the restriction being that there have to be
stemmer instances for the languages with the database encoding you're
using.  With UTF8 encoding this isn't much of a restriction.  We do need
to put code into the dictionary stuff to enforce that you can't use a
stemmer when the database encoding isn't compatible with it.

I would prefer that we not drive any of this stuff off the server's
LC_xxx settings, since as you say that restricts things to just one
locale.

> Second, I can't figure out how to reference a non-default
> configuration.

See the multi-argument versions of to_tsvector etc.

I do see a problem with having to_tsvector(config, text) plus
to_tsvector(text) where the latter implicitly references a config
selected by a GUC variable: how can you tell whether a query using the
latter matches a particular index using the former?  There isn't
anything in the current planner mechanisms that would make that work.
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: How does the tsearch configuration get selected?
Следующее
От: Oleg Bartunov
Дата:
Сообщение: Re: How does the tsearch configuration get selected?