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

Class Exact

haystack/inputs.py:62–79  ·  view source on GitHub ↗

An input type for making exact matches.

Source from the content-addressed store, hash-verified

60
61
62class Exact(BaseInput):
63 """
64 An input type for making exact matches.
65 """
66
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):

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…