Re: Prefix search on all hstore values
От | Sergey Konoplev |
---|---|
Тема | Re: Prefix search on all hstore values |
Дата | |
Msg-id | CAL_0b1sop0x20GDAT5pb1u5xW4KmGdoBsCYtirjhx3Evw+=J0Q@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Prefix search on all hstore values (Teodor Sigaev <teodor@sigaev.ru>) |
Ответы |
Re: Prefix search on all hstore values
|
Список | pgsql-general |
On Thu, Nov 28, 2013 at 12:44 AM, Teodor Sigaev <teodor@sigaev.ru> wrote: > Full-text search has this feature. > > # select to_tsvector('en_name=>yes, fr_name=>oui'::hstore::text) @@ 'en:*'; > ?column? > ---------- > t > > or (index only keys) > > select to_tsvector(akeys('en_name=>yes, fr_name=>oui'::hstore)::text) @@ > 'en:*'; > ?column? > ---------- > t > > To speed up this queries you use functional indexes. It wont work. The OP needs to search by values prefixes, not by any separate word in the hstore. # select to_tsvector('en_name=>"oh yes", fr_name=>oui'::hstore::text) @@ 'ye:*'; ?column? ---------- t -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979 gray.ru@gmail.com
В списке pgsql-general по дате отправления: