-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PB-118: Take into account the GET key limit as well on bbox searches #61
Conversation
@@ -197,7 +197,8 @@ def _swiss_search(self): # pylint: disable=too-many-branches, too-many-statemen | |||
coords = self._get_geoanchor_from_bbox() | |||
self.sphinx.SetGeoAnchor('lat', 'lon', coords[1], coords[0]) # pylint: disable=unsubscriptable-object | |||
self.sphinx.SetSortMode(sphinxapi.SPH_SORT_EXTENDED, '@geodist ASC') | |||
limit = self.BBOX_SEARCH_LIMIT | |||
limit = self.limit if self.limit and \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, thank you 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be simplified by limit = min(self.limit, self.BBOX_SEARCH_LIMT)
Of course for this to work both parameter needs to be numbers
078b0fc
to
004ed1b
Compare
004ed1b
to
650b009
Compare
650b009
to
da96e38
Compare
e2e-tests passed successfully on this pr |
@@ -197,7 +197,8 @@ def _swiss_search(self): # pylint: disable=too-many-branches, too-many-statemen | |||
coords = self._get_geoanchor_from_bbox() | |||
self.sphinx.SetGeoAnchor('lat', 'lon', coords[1], coords[0]) # pylint: disable=unsubscriptable-object | |||
self.sphinx.SetSortMode(sphinxapi.SPH_SORT_EXTENDED, '@geodist ASC') | |||
limit = self.BBOX_SEARCH_LIMIT | |||
limit = self.limit if self.limit and \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be simplified by limit = min(self.limit, self.BBOX_SEARCH_LIMT)
Of course for this to work both parameter needs to be numbers
No description provided.