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

Method add_within

haystack/backends/__init__.py:907–915  ·  view source on GitHub ↗

Adds bounding box parameters to search query.

(self, field, point_1, point_2)

Source from the content-addressed store, hash-verified

905 self.highlight = kwargs or True
906
907 def add_within(self, field, point_1, point_2):
908 """Adds bounding box parameters to search query."""
909 from haystack.utils.geo import ensure_point
910
911 self.within = {
912 "field": field,
913 "point_1": ensure_point(point_1),
914 "point_2": ensure_point(point_2),
915 }
916
917 def add_dwithin(self, field, point, distance):
918 """Adds radius-based parameters to search query."""

Callers 1

withinMethod · 0.80

Calls 1

ensure_pointFunction · 0.90

Tested by

no test coverage detected