Skip to content

Commit

Permalink
[4.0.x] Fixed #33459 -- Clarified index type in full text search docs.
Browse files Browse the repository at this point in the history
Backport of 3a9b8b2 from main
  • Loading branch information
roskakori authored and felixxm committed Jan 28, 2022
1 parent 7c2d4d9 commit 9a9c5b4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/ref/contrib/postgres/search.txt
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,14 @@ run into performance problems. Full text search is a more intensive process
than comparing the size of an integer, for example.

In the event that all the fields you're querying on are contained within one
particular model, you can create a functional index which matches the search
vector you wish to use. The PostgreSQL documentation has details on
particular model, you can create a functional
:class:`GIN <django.contrib.postgres.indexes.GinIndex>` or
:class:`GiST <django.contrib.postgres.indexes.GistIndex>` index which matches
the search vector you wish to use. For example::

GinIndex(SearchVector('body_text'), name='body_search_vector_idx')

The PostgreSQL documentation has details on
`creating indexes for full text search
<https://www.postgresql.org/docs/current/textsearch-tables.html#TEXTSEARCH-TABLES-INDEX>`_.

Expand Down

0 comments on commit 9a9c5b4

Please sign in to comment.