[Django] #27251: Cannot combine multiple SearchQuery objects

4 views
Skip to first unread message

Django

unread,
Sep 20, 2016, 9:18:03 AM9/20/16
to django-...@googlegroups.com
#27251: Cannot combine multiple SearchQuery objects
----------------------------------+------------------
Reporter: jaap3 | Owner:
Type: Bug | Status: new
Component: contrib.postgres | Version: 1.10
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------
According to the docs:

[https://docs.djangoproject.com/en/1.10/ref/contrib/postgres/search/#searchquery
SearchQuery] terms can be combined logically to provide more flexibility

This works for two SearchQuery objects

{{{
>>> SearchQuery('foo') | SearchQuery('bar')
<CombinedExpression: SearchQuery(foo) || SearchQuery(bar)>
}}}

But any more than that and an exception is raised:

{{{
>>> SearchQuery('foo') | SearchQuery('bar') | SearchQuery('baz')
NotImplementedError: Use .bitand() and .bitor() for bitwise logical
operations.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27251>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 20, 2016, 9:29:47 AM9/20/16
to django-...@googlegroups.com
#27251: Cannot combine multiple SearchQuery objects
----------------------------------+--------------------------------------
Reporter: jaap3 | Owner:
Type: Bug | Status: closed
Component: contrib.postgres | Version: 1.10
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------
Changes (by claudep):

* status: new => closed
* needs_better_patch: => 0
* resolution: => duplicate
* needs_tests: => 0
* needs_docs: => 0


Comment:

Should be fixed in #27143.

--
Ticket URL: <https://code.djangoproject.com/ticket/27251#comment:1>

Reply all
Reply to author
Forward
0 new messages