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

Master #68

Merged
merged 2 commits into from
Dec 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,11 @@ def _fuzzy_search(self, searchTextFinal):
logger.debug("Search fuzzy; searchText=%s", searchTextFinal)
# We use different ranking for fuzzy search
# For ranking modes, see http://sphinxsearch.com/docs/current.html#weighting
self.sphinx.SetRankingMode(sphinxapi.SPH_RANK_SPH04)
self.sphinx.SetRankingMode(sphinxapi.SPH_RANK_BM25)
# Only include results with a certain weight. This might need tweaking
# with the quorum operator lesser weights should be added to the results for the better
# support of fuzziness
self.sphinx.SetFilterRange('@weight', 2500, 2**32 - 1)
self.sphinx.SetFilterRange('@weight', 1000, 2**32 - 1)
try:
if self.typeInfo in ('locations'):
results = self.sphinx.Query(searchTextFinal, index='swisssearch_fuzzy')
Expand Down
Loading