1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Fixed #33459 -- Clarified index type in full text search docs.

This commit is contained in:
Thomas Aglassinger 2022-01-28 06:36:39 +01:00 committed by GitHub
parent e87f57fdb8
commit 3a9b8b25d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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>`_.