diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2017-03-31 14:26:03 -0400 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2017-03-31 14:26:03 -0400 |
commit | e306df7f9cd6b4433273e006df11bdc966b7079e (patch) | |
tree | 9afb3d3ca47524d12b936c2fdfa37427eeaf62ea /doc/src | |
parent | c80b9920fcbcbf75e3d7e8fe092bf6e15d9d40b8 (diff) | |
download | postgresql-e306df7f9cd6b4433273e006df11bdc966b7079e.tar.gz postgresql-e306df7f9cd6b4433273e006df11bdc966b7079e.zip |
Full Text Search support for json and jsonb
The new functions are ts_headline() and to_tsvector.
Dmitry Dolgov, edited and documented by me.
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/func.sgml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 076be587eac..6887eabd0e9 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -9566,6 +9566,15 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple </row> <row> <entry> + <literal><function>to_tsvector(<optional> <replaceable class="PARAMETER">config</> <type>regconfig</> , </optional> <replaceable class="PARAMETER">document</> <type>json(b)</type>)</function></literal> + </entry> + <entry><type>tsvector</type></entry> + <entry>reduce document text to <type>tsvector</></entry> + <entry><literal>to_tsvector('english', '{"a": "The Fat Rats"}'::json)</literal></entry> + <entry><literal>'fat':2 'rat':3</literal></entry> + </row> + <row> + <entry> <indexterm> <primary>ts_delete</primary> </indexterm> @@ -9612,6 +9621,15 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple </row> <row> <entry> + <literal><function>ts_headline(<optional> <replaceable class="PARAMETER">config</replaceable> <type>regconfig</>, </optional> <replaceable class="PARAMETER">document</replaceable> <type>json(b)</>, <replaceable class="PARAMETER">query</replaceable> <type>tsquery</> <optional>, <replaceable class="PARAMETER">options</replaceable> <type>text</> </optional>)</function></literal> + </entry> + <entry><type>text</type></entry> + <entry>display a query match</entry> + <entry><literal>ts_headline('{"a":"x y z"}'::json, 'z'::tsquery)</literal></entry> + <entry><literal>{"a":"x y <b>z</b>"}</literal></entry> + </row> + <row> + <entry> <indexterm> <primary>ts_rank</primary> </indexterm> |