You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yep, I'm getting the same. Also noticed that the + (must) operator does not encapsulate terms as expected:
>>>q=Q('Mary had a little lamb') &+(Q('author', 'jimmy') |Q('author', 'jack'))
>>>str(q)
'("Mary had a little lamb" AND +author:(jimmy) author:(jack))'
Expected:
'("Mary had a little lamb" AND +(author:(jimmy) OR author:(jack)))'
I'm trying to build a query using the following code:
q = Q(Q('class','comment') | Q('class','post')) & Q('text','things')
I was expecting the output to be:
(class:(post) OR class:(comment)) text:'things'
instead I get:
(class:(comment) class:(post) AND text:(things))
Which is obviously wrong and doesn't work.
For reference a query of:
Q( Q('a')|Q('b')) & Q('text','things')
does actually output the correct query:
((a OR b) AND text:(things))
The text was updated successfully, but these errors were encountered: