diff options
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/func.sgml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index a86d3f40f17..3dbfa1dec34 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -9729,6 +9729,26 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple </row> <row> <entry> + <literal><function>json(b)_to_tsvector(<optional> <replaceable class="parameter">config</replaceable> <type>regconfig</type>, + </optional> <replaceable class="parameter">document</replaceable> <type>json(b)</type>, + <replaceable class="parameter">filter</replaceable> <type>json(b)</type>)</function></literal> + </entry> + <entry><type>tsvector</type></entry> + <entry> + reduce each value in the document, specified by <replaceable class="parameter">filter</replaceable> to a <type>tsvector</type>, + and then concatenate those in document order to produce a single <type>tsvector</type>. + <replaceable class="parameter">filter</replaceable> is a jsonb array, that enumerates what kind of elements need to be included + into the resulting <type>tsvector</type>. Possible values for <replaceable class="parameter">filter</replaceable> are + <literal>"string"</literal> (to include all string values), <literal>"numeric"</literal> (to include all numeric values in the string format), + <literal>"boolean"</literal> (to include all boolean values in the string format "true"/"false"), + <literal>"key"</literal> (to include all keys) or <literal>"all"</literal> (to include all above). These values + can be combined together to include, e.g. all string and numeric values. + </entry> + <entry><literal>json_to_tsvector('english', '{"a": "The Fat Rats", "b": 123}'::json, '["string", "numeric"]')</literal></entry> + <entry><literal>'123':5 'fat':2 'rat':3</literal></entry> + </row> + <row> + <entry> <indexterm> <primary>ts_delete</primary> </indexterm> |