1
0
mirror of https://github.com/django/django.git synced 2025-06-04 19:19:13 +00:00

[2.0.x] Made SearchQuery examples less sterotyped.

Backport of 346eb328617ada9c65f5c9ded2e2914f3dcc04c9 from master
This commit is contained in:
Simon Willison 2017-10-06 12:44:44 -07:00 committed by Tim Graham
parent c678ff91b1
commit 9a2c2b7a68

View File

@ -80,9 +80,9 @@ looks for matches for all of the resulting terms.
``SearchQuery`` terms can be combined logically to provide more flexibility::
>>> from django.contrib.postgres.search import SearchQuery
>>> SearchQuery('potato') & SearchQuery('ireland') # potato AND ireland
>>> SearchQuery('potato') | SearchQuery('penguin') # potato OR penguin
>>> ~SearchQuery('sausage') # NOT sausage
>>> SearchQuery('meat') & SearchQuery('cheese') # AND
>>> SearchQuery('meat') | SearchQuery('cheese') # OR
>>> ~SearchQuery('meat') # NOT
See :ref:`postgresql-fts-search-configuration` for an explanation of the
``config`` parameter.