#27143: SearchQuery is not combinable using more than one `&` or `|` operators
----------------------------------+------------------------------------
     Reporter:  hixi              |                    Owner:
         Type:  Bug               |                   Status:  new
    Component:  contrib.postgres  |                  Version:  master
     Severity:  Normal            |               Resolution:
     Keywords:  Search            |             Triage Stage:  Accepted
    Has patch:  0                 |      Needs documentation:  0
  Needs tests:  0                 |  Patch needs improvement:  0
Easy pickings:  0                 |                    UI/UX:  0
----------------------------------+------------------------------------

Comment (by jarshwah):

 More detail here: https://groups.google.com/forum/#!topic/django-
 developers/hTj7NLXu2xw

 Copying the likely fix:

 SearchQuery defines its own operators to work around the limitation in
 Combinable, but fails to take into account that when two SearchQuery
 instances are combined, you're returned a CombinedExpression (containing
 SearchQueries). SearchVector *does* take this into consideration
 though.The fix would be to define a SearchQueryCombinable Mixin that looks
 very similar to SearchVectorCombinable, and override the various __or__
 and __and__ methods, as the SearchQuery type does itself.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.2f218c186a3c75252d3cbaf27271ef9d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to