Skip to content

Commit

Permalink
Merge pull request #60 from geoadmin/master
Browse files Browse the repository at this point in the history
update from master
  • Loading branch information
ltclm authored Feb 22, 2024
2 parents 02ebec7 + efa2cf3 commit 8ffffd7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ def _swiss_search(self): # pylint: disable=too-many-branches, too-many-statemen
# Filter by origins if needed
if self.origins is None:
self._detect_keywords()
# by default filter all available origins/ranks
self.sphinx.SetFilter('rank', [1, 2, 3, 4, 5, 6, 7, 10])
else:
self._filter_locations_by_origins()

Expand All @@ -232,7 +234,7 @@ def _swiss_search(self): # pylint: disable=too-many-branches, too-many-statemen
# standard wildcard search
self.sphinx.AddQuery(searchTextFinal, index='swisssearch')

# exact search, first 10 results
# exact prefix search, first 10 results
searchText = '@detail "^{}"'.format(' '.join(self.searchText)) # pylint: disable=consider-using-f-string
self.sphinx.AddQuery(searchText, index='swisssearch')

Expand Down

0 comments on commit 8ffffd7

Please sign in to comment.