Skip to content

Commit adef6cc

Browse files
committed
docs: note index on automatic tsvector
1 parent 9f056ac commit adef6cc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/references/api/tables_views.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,15 @@ This allows using the ``fts`` operator on ``text`` and ``json`` types out of the
217217
curl --get "http://localhost:3000/people" \
218218
-d "my_json_column=not.phfts(english).The%20Fat%20Cats"
219219
220+
.. important::
221+
222+
To ensure this operation is fast, you need to create an index on the expression:
223+
224+
.. code-block:: postgres
225+
226+
CREATE INDEX idx_people_col ON people
227+
USING GIN (to_tsvector(my_text_column));
228+
220229
.. _v_filter:
221230

222231
Vertical Filtering

0 commit comments

Comments
 (0)