Hi, I would like to find the result of which object an specific value is null.
Q('match', test__pk= None )
It shows TransportError(400, u'parsing_exception', u'No text specified for text query')
how can i solve it?
If you wish to looks for a null/None value please use a negation of the exists query: ~Q('exists', field='test.pk').
The reason for that is that null/None values don't get stored in the index so the engine treats them as missing.
Hope this helps,
Honza
Most helpful comment
If you wish to looks for a
null/Nonevalue please use a negation of theexistsquery:~Q('exists', field='test.pk').The reason for that is that
null/Nonevalues don't get stored in the index so the engine treats them as missing.Hope this helps,
Honza