From 06e721bc749f203158634cdf116531e320dbb9d1 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Mon, 12 Oct 2015 22:04:29 +0100 Subject: [PATCH] document the 'operator' kwarg on QuerySet.search --- docs/topics/search/searching.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/topics/search/searching.rst b/docs/topics/search/searching.rst index 32d45d667..9f061b9db 100644 --- a/docs/topics/search/searching.rst +++ b/docs/topics/search/searching.rst @@ -139,6 +139,16 @@ Here's an example of using the "operator" keyword argument: [] +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 + [, , ] + + .. _wagtailsearch_frontend_views: