Adds bounding box parameters to search query.
(self, field, point_1, point_2)
| 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.""" |