Skip to content

Conversation

@fibreditoniocartonio
Copy link

What does this PR do?

This pull request introduces an optional "fuzzy search" feature to the app search functionality. This allows for more flexible and typo-tolerant app searching. For example, a search for "Qhattsapp" will now correctly match "WhatsApp".

This addresses issue [Link to the issue, if one exists].

Why is this change being made?

The current search algorithm requires an exact match, which can be unforgiving of minor typos. This can slow down users who rely on quick, keyboard-based app launching.

By implementing a fuzzy search option, we can significantly improve the user experience by making the search more intuitive and forgiving of errors. This change brings KISS Launcher's search capabilities in line with other minimalist launchers that offer similar flexible search algorithms.

How is this implemented?

  • A new "Enable Fuzzy Search" option has been added to the Search Settings menu.
  • When enabled, the app search will utilize a fuzzy matching algorithm to find the most relevant application, even with imperfect queries.
  • When disabled, the launcher will revert to the classic, strict matching algorithm for users who prefer precision.

How can this be tested?

  1. Navigate to Settings > Search Settings.
  2. Enable the "Fuzzy Search" option.
  3. Return to the home screen and search for an application with a deliberate typo (e.g., "Gogle" instead of "Google").
  4. Verify that the intended application appears as a top result.
  5. Disable the "Fuzzy Search" option and repeat the search.
  6. Confirm that the application is not found with the typo.

Copy link
Collaborator

@marunjar marunjar left a comment

Choose a reason for hiding this comment

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

Encapsulation is missing, levenshtein is currently used for apps only.

Can you add some basic test like FuzzyScoreV1Test and FuzzyScoreV2Test to show/test behaviour too?

}

FuzzyScore fuzzyScore = FuzzyFactory.createFuzzyScore(this, queryNormalized.codePoints);
boolean flexibleFuzzy = prefs.getBoolean("enable-fuzzy-search", false);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you please encapsulate new search same way as other search algorithm?

This way it's just working for apps, but there are lots of other places using fuzzy search like shortcuts, contacts (surname, last name, nickname, ...) and some others. Also refresh of results needs it at some point.

See FuzzyFactory, there you can return new implementation of FuzzyScore including levenshtein.

<string name="contacts_name">Contacts</string>
<string name="contacts_call_on_click">Click to call contacts</string>
<string name="search_results_options">Search results</string>
<string name="fuzzy_search_name">Enable fuzzy search</string>
Copy link
Collaborator

Choose a reason for hiding this comment

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

I personally would change "Fuzzy" in text to something else, as this is misleading.
Current search algorithm is fuzzy and the other one too.
Difference is that one is just not checking if words are similar.

Copy link
Owner

Choose a reason for hiding this comment

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

"Typo tolerant search"?

Copy link
Collaborator

@marunjar marunjar Oct 8, 2025

Choose a reason for hiding this comment

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

or something containing "similar"?

}

// Match against app name
int distance = substringLevenshteinDistance(queryNormalized.codePoints, pojo.normalizedName.codePoints);
Copy link
Owner

Choose a reason for hiding this comment

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

I wonder how this behaves in terms of performance with 5k contacts. I remember Levenshtein isn't computationally free, so I'll be curious to test this with live data :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

i think jaro/jaro-winkler is faster

@sandr451
Copy link

Turning on this feature still doesn't work .
Tried "motebook" and notebook app still didn't appear. Restarted the launcher too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants