MCPcopy Index your code
hub / github.com/django-haystack/django-haystack / exclude

Method exclude

haystack/query.py:333–337  ·  view source on GitHub ↗

Narrows the search by ensuring certain attributes are not included.

(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

331 return self.filter_and(*args, **kwargs)
332
333 def exclude(self, *args, **kwargs):
334 """Narrows the search by ensuring certain attributes are not included."""
335 clone = self._clone()
336 clone.query.add_filter(~SQ(*args, **kwargs))
337 return clone
338
339 def filter_and(self, *args, **kwargs):
340 """Narrows the search by looking for (and including) certain attributes."""

Callers 13

test_excludeMethod · 0.45
test_excludeMethod · 0.45
test_excludeMethod · 0.45
test___and__Method · 0.45
test___or__Method · 0.45
test___and__Method · 0.45
test___or__Method · 0.45
test___and__Method · 0.45
test___or__Method · 0.45
test___and__Method · 0.45
test___or__Method · 0.45
test_general_queriesMethod · 0.45

Calls 3

_cloneMethod · 0.95
SQClass · 0.90
add_filterMethod · 0.80

Tested by 13

test_excludeMethod · 0.36
test_excludeMethod · 0.36
test_excludeMethod · 0.36
test___and__Method · 0.36
test___or__Method · 0.36
test___and__Method · 0.36
test___or__Method · 0.36
test___and__Method · 0.36
test___or__Method · 0.36
test___and__Method · 0.36
test___or__Method · 0.36
test_general_queriesMethod · 0.36