document the 'operator' kwarg on QuerySet.search

pull/1821/head
Matt Westcott 2015-10-12 22:04:29 +01:00
rodzic 4dbf166e06
commit 06e721bc74
1 zmienionych plików z 10 dodań i 0 usunięć

Wyświetl plik

@ -139,6 +139,16 @@ Here's an example of using the "operator" keyword argument:
[<Thing: Hello world>]
For page, image and document models, the ``operator`` keyword argument is also supported on the QuerySet's ``search`` method:
.. code-block:: python
>>> Page.objects.search("Hello world", operator="or")
# All pages containing either "hello" or "world" are returned
[<Page: Hello World>, <Page: Hello>, <Page: World>]
.. _wagtailsearch_frontend_views: