From e306df7f9cd6b4433273e006df11bdc966b7079e Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Fri, 31 Mar 2017 14:26:03 -0400 Subject: Full Text Search support for json and jsonb The new functions are ts_headline() and to_tsvector. Dmitry Dolgov, edited and documented by me. --- doc/src/sgml/func.sgml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'doc/src') 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 @@ -9564,6 +9564,15 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple to_tsvector('english', 'The Fat Rats') 'fat':2 'rat':3 + + + to_tsvector( config regconfig , document json(b)) + + tsvector + reduce document text to tsvector + to_tsvector('english', '{"a": "The Fat Rats"}'::json) + 'fat':2 'rat':3 + @@ -9610,6 +9619,15 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple ts_headline('x y z', 'z'::tsquery) x y <b>z</b> + + + ts_headline( config regconfig, document json(b), query tsquery , options text ) + + text + display a query match + ts_headline('{"a":"x y z"}'::json, 'z'::tsquery) + {"a":"x y <b>z</b>"} + -- cgit v1.2.3