Skip to content
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

Merged
merged 2 commits into from
Mar 18, 2024

Conversation

rebert
Copy link
Contributor

@rebert rebert commented Mar 13, 2024

No description provided.

@github-actions github-actions bot added the bug label Mar 13, 2024
@rebert rebert requested review from ltshb and ltclm March 13, 2024 14:21
app/search.py Outdated Show resolved Hide resolved
@@ -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 \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, thank you 👍

Copy link
Contributor

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

@rebert rebert force-pushed the fix-PB-118-limit-on-bbox-extends-searches branch 2 times, most recently from 078b0fc to 004ed1b Compare March 13, 2024 15:35
@rebert rebert requested review from ltclm and hansmannj March 13, 2024 15:36
@rebert rebert changed the title PB-1118: Take into account the GET key limit as well on bbox searches PB-118: Take into account the GET key limit as well on bbox searches Mar 13, 2024
@rebert rebert force-pushed the fix-PB-118-limit-on-bbox-extends-searches branch from 004ed1b to 650b009 Compare March 13, 2024 15:38
@rebert rebert force-pushed the fix-PB-118-limit-on-bbox-extends-searches branch from 650b009 to da96e38 Compare March 13, 2024 15:48
@rebert rebert requested a review from boecklic March 14, 2024 14:20
@rebert
Copy link
Contributor Author

rebert commented Mar 15, 2024

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 \
Copy link
Contributor

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

@rebert rebert merged commit 2d4a575 into develop Mar 18, 2024
3 checks passed
@rebert rebert deleted the fix-PB-118-limit-on-bbox-extends-searches branch March 18, 2024 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants