MCPcopy Create free account
hub / github.com/django-haystack/django-haystack / prepare

Method prepare

haystack/inputs.py:69–79  ·  view source on GitHub ↗
(self, query_obj)

Source from the content-addressed store, hash-verified

67 input_type_name = "exact"
68
69 def prepare(self, query_obj):
70 query_string = super().prepare(query_obj)
71
72 if self.kwargs.get("clean", False):
73 # We need to clean each part of the exact match.
74 exact_bits = [
75 Clean(bit).prepare(query_obj) for bit in query_string.split(" ") if bit
76 ]
77 query_string = " ".join(exact_bits)
78
79 return query_obj.build_exact_query(query_string)
80
81
82class Not(Clean):

Callers 6

test_exact_prepareMethod · 0.95
test_exact_prepareMethod · 0.95
test_exact_prepareMethod · 0.95
test_exact_prepareMethod · 0.95
test_exact_prepareMethod · 0.95
test_exact_prepareMethod · 0.95

Calls 4

CleanClass · 0.85
getMethod · 0.80
build_exact_queryMethod · 0.80
prepareMethod · 0.45

Tested by 6

test_exact_prepareMethod · 0.76
test_exact_prepareMethod · 0.76
test_exact_prepareMethod · 0.76
test_exact_prepareMethod · 0.76
test_exact_prepareMethod · 0.76
test_exact_prepareMethod · 0.76