mirror of
https://github.com/django/django.git
synced 2025-03-13 10:50:55 +00:00
[1.10.x] Fixed #26684 -- Removed incorrect index example in docs/ref/contrib/postgres/search.txt.
Backport of 92107522ed3568740ec7c3597db50b5c3a6e84d3 from master
This commit is contained in:
parent
b737c0f5db
commit
3e1c8fc4c0
@ -165,14 +165,9 @@ than comparing the size of an integer, for example.
|
|||||||
|
|
||||||
In the event that all the fields you're querying on are contained within one
|
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
|
particular model, you can create a functional index which matches the search
|
||||||
vector you wish to use. For example:
|
vector you wish to use. The PostgreSQL documentation has details on
|
||||||
|
`creating indexes for full text search
|
||||||
.. code-block:: sql
|
<http://www.postgresql.org/docs/current/static/textsearch-tables.html#TEXTSEARCH-TABLES-INDEX>`_.
|
||||||
|
|
||||||
CREATE INDEX body_text_search ON blog_entry (to_tsvector(body_text));
|
|
||||||
|
|
||||||
This index will then be used by subsequent queries. In many cases this will be
|
|
||||||
sufficient.
|
|
||||||
|
|
||||||
``SearchVectorField``
|
``SearchVectorField``
|
||||||
---------------------
|
---------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user