mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-09 07:54:44 +00:00
document the 'operator' kwarg on QuerySet.search
This commit is contained in:
parent
4dbf166e06
commit
06e721bc74
1 changed files with 10 additions and 0 deletions
|
|
@ -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:
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue