mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Refs #26285 -- Removed MySQL __search lookup per deprecation timeline.
This commit is contained in:
parent
bfe0d54514
commit
5139832398
7 changed files with 4 additions and 101 deletions
|
@ -2918,33 +2918,6 @@ SQL equivalent::
|
|||
|
||||
SELECT ... WHERE pub_date IS NULL;
|
||||
|
||||
.. fieldlookup:: search
|
||||
|
||||
``search``
|
||||
~~~~~~~~~~
|
||||
|
||||
.. deprecated:: 1.10
|
||||
|
||||
See :ref:`the 1.10 release notes <search-lookup-replacement>` for how to
|
||||
replace it.
|
||||
|
||||
A boolean full-text search, taking advantage of full-text indexing. This is
|
||||
like :lookup:`contains` but is significantly faster due to full-text indexing.
|
||||
|
||||
Example::
|
||||
|
||||
Entry.objects.filter(headline__search="+Django -jazz Python")
|
||||
|
||||
SQL equivalent::
|
||||
|
||||
SELECT ... WHERE MATCH(tablename, headline) AGAINST (+Django -jazz Python IN BOOLEAN MODE);
|
||||
|
||||
Note this is only available in MySQL and requires direct manipulation of the
|
||||
database to add the full-text index. By default Django uses BOOLEAN MODE for
|
||||
full text searches. See the `MySQL documentation`_ for additional details.
|
||||
|
||||
.. _MySQL documentation: https://dev.mysql.com/doc/refman/en/fulltext-boolean.html
|
||||
|
||||
.. fieldlookup:: regex
|
||||
|
||||
``regex``
|
||||
|
|
|
@ -353,3 +353,5 @@ these features.
|
|||
|
||||
* Support for query lookups using the model name when
|
||||
``Meta.default_related_name`` is set is removed.
|
||||
|
||||
* The MySQL ``__search`` lookup is removed.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue