Add json(b)_to_tsvector function

Teodor Sigaev <teodor@sigaev.ru>

Commit: 1c1791e00065f6986f9d44a78ce7c28b2d1322dd
Author: Teodor Sigaev <teodor@sigaev.ru>
Date: 2018-04-07T17:58:03Z
Releases: 11.0
Add json(b)_to_tsvector function

Jsonb has a complex nature so there isn't best-for-everything way to convert it
to tsvector for full text search. Current to_tsvector(json(b)) suggests to
convert only string values, but it's possible to index keys, numerics and even
booleans value. To solve that json(b)_to_tsvector has a second required
argument contained a list of desired types of json fields. Second argument is
a jsonb scalar or array right now with possibility to add new options in a
future.

Bump catalog version

Author: Dmitry Dolgov with some editorization by me
Reviewed by: Teodor Sigaev
Discussion: https://www.postgresql.org/message-id/CA+q6zcXJQbS1b4kJ_HeAOoOc=unfnOrUEL=KGgE32QKDww7d8g@mail.gmail.com

Files

Documentation touched

Discussion