1
0
mirror of https://github.com/django/django.git synced 2025-04-12 03:22:21 +00:00

[4.1.x] Improved example of index on SearchVector in full text search docs.

Backport of 0010721e892b470e90878f6128b490f52ebac8c4 from main
This commit is contained in:
Ilia Peterov 2022-08-29 21:28:00 +04:00 committed by Mariusz Felisiak
parent 524ea6b77b
commit e992703e07

@ -260,7 +260,10 @@ particular model, you can create a functional
: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')
GinIndex(
SearchVector('body_text', 'headline', config='english'),
name='search_vector_idx',
)
The PostgreSQL documentation has details on
`creating indexes for full text search