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

Editor "Search Help" fuzzy search results are significantly less helpful #39128

Closed
follower opened this issue May 28, 2020 · 4 comments · Fixed by #39990
Closed

Editor "Search Help" fuzzy search results are significantly less helpful #39128

follower opened this issue May 28, 2020 · 4 comments · Fixed by #39990

Comments

@follower
Copy link
Contributor


TL;DR:

Could we please revert/rework #32043 so Editor Search Help results are more helpful? :)


Godot version: 3.2.1.stable.official

OS/device including version: N/A (Cross-platform)

Issue description:

I'd been wondering for a while why the editor help search results seemed less...helpful of late.

My initial investigations suggest that the switch to "fuzzy" is_subsequence_of() based search in #32043 has resulted in the decrease of useful results and increase of unhelpful "noise".

Screenshot comparison between Godot 3.1.2 & Godot 3.2.1 searches for terms which I recently searched:

  • cache

    • 3.1.2: godot-search-help--fuzzy-issue--3 1 2--search-cache

    • 3.2.1: godot-search-help--fuzzy-issue--3 2 1--search-cache

  • (Three more examples follow under "details".)

  • stor

    • 3.1.2: godot-search-help--fuzzy-issue--3 1 2--search-stor

    • 3.2.1: godot-search-help--fuzzy-issue--3 2 1--search-stor

  • store

    • 3.1.2: godot-search-help--fuzzy-issue--3 1 2--search-store

    • 3.2.1: godot-search-help--fuzzy-issue--3 2 1--search-store

  • search

    • 3.1.2: godot-search-help--fuzzy-issue--3 1 2--search-search

    • 3.2.1: godot-search-help--fuzzy-issue--3 2 1--search-search

In particular note:

  • The number of results returned (compare relative size of the scrollbar position indicator).

  • The "usefulness" of the results returned & initially displayed (compare how the subsequence vs substring search returns many results completely unrelated to the search term--due purely to the frequency of the letter order occurring in other method names etc).

  • The abundance of results returned makes it difficult to scan through for the exact substring matches that do exist.

Steps to reproduce:

Use the Editor "Search Help" tool bar button or menu options to search for:

  • search

  • cache

  • stor

  • store

Minimal reproduction project: N/A

Observations: Factors affecting suitableness of subsequence-based search

While investigating this issue I observed some factors that seem to influence how effective subsequence-based fuzzy matching is in comparison to strict substring-based matches:

  • Searches for known results vs unknown results: I notice the original reason for the addition of is_subsequence_of() functionality was to make it easier to get one specific result: e.g. search for kin2 to get KinematicBody2D, i.e. "search as shortcut" or "fewest characters required to get result".

    In comparison, an "exploration" search where the "correct" result is unknown but perhaps relates to a specific keyword seems less likely to use non-contiguous sequences of characters in the search term.

  • Search domain with many long common prefixes vs not: e.g. the characters tic in kinematic don't reduce the number of search results so are redundant in filtering.

    But also, k is also less frequent character so is perhaps not a great test case: e.g. compare ka vs sa or ke vs se.

    (Aside: I just noticed that the result list is longer for ki than for k on its own...)

  • UI component/display style: e.g. linear/list display vs tree; multi-panel vs single panel affects effectiveness. This impacts the next factor.

  • Filtering vs ranking/scoring/sorting: A linear list can more easily suit a "filter and sort by quality" approach than a tree where the hierarchy makes sorting & changing the order of results more difficult.

Observations: Areas of application

Within Godot "filtering a list or tree of potential results" seems to be used in a number of domains, including:

  • Code auto-complete [I feel like there's maybe been a regression here too?]

  • Reference documentation

  • Node creation filtering

  • Settings

Each of these domains are influenced by a different combination of the factors discussed above as to the suitableness of subsequence-search.

(There's also an influence based on the level of experience of a particular individual using Godot which affects the appropriateness.)

There also currently seems to be some level of duplication of code between these domains within Godot which means that improvements that are generally appropriate are only made to one specific feature domain.

Observations: Benefit of before vs after patch screenshots

The contrast in the number/quality of the results returned seem fairly stark in the screenshots I recorded--I wonder if it would be good to more commonly request such before/after screenshots for certain types of patches to more readily identify potential issues such as this.

Related links/issues

Update: Godot 3.2.2b3

For "completeness" I also just tested with Godot 3.2.2b3 but there doesn't appear to be significant/any difference in results:

  • cache: godot-search-help--fuzzy-issue--3 2 2b3--search-cache

  • stor: godot-search-help--fuzzy-issue--3 2 2b3--search-stor

  • store: godot-search-help--fuzzy-issue--3 2 2b3--search-store

  • search: godot-search-help--fuzzy-issue--3 2 2b3--search-search

@follower
Copy link
Contributor Author

FWIW I'm still of the opinion that this issue rates being treated as a serious usability regression issue rather than a discussion level issue.

Here's a specific example I just encountered when I wanted to know whether there is a method to return the absolute form of a path (for a non-open file). I knew I had to use the search term abs because the existing methods I knew of use both abs & absolute.

Here's the result in 3.2.1 with the help window stretched vertically as far as it will go (and I'm on a (uncommon but fantastic--highly recommend :) ) 16:10 aspect ratio screen, so it'd be worse on a standard 16:9 aspect ratio screen:

godot-search-issue--term-abs--3 2 1

And in 3.1.2 (which I opened in order to actually find out the answer--which is...maybe no?) :

godot-search-issue--term-abs--3 1 2

Unless there's very specific sequences of letters that someone with experience might use to find a specific item, returning so many irrelevant results really gets in the way of both new comers & experienced people searching.

If there's substring (rather than subsequence) matches they should take priority. Needing to go back to an older Godot version in order to get useful search results is...not ideal. :)

Reverting #32043 would make the most common scenario usable again and the fuzzy search could be re-worked to take advantage of the sorting/scoring functionality already implemented elsewhere and then reinstated.

@Calinou
Copy link
Member

Calinou commented Jun 16, 2020

cc @akien-mga

@follower
Copy link
Contributor Author

It's like a hex has been put on help search:

  • v3.1.2:

    godot-search-hex-good

  • v3.2.2:

    godot-search-hex-bad

On my monitor there's four screens of unhelpful results before the useful results.

@Calinou
Copy link
Member

Calinou commented Jun 30, 2020

@follower If you want to get the ball rolling, please open a pull request reverting the change.

follower added a commit to follower/godot that referenced this issue Jun 30, 2020
This reverts commit 481dbce.

Current fuzzy search implementation results in too many
non-useful results.

Could be re-added after result sort/filter/score functionality
is added. See godotengine#30072 for example existing implementation.

Fixes: godotengine#39128

Reverts: godotengine#32043

Fixed format style conflicts:
	editor/editor_help_search.cpp
@akien-mga akien-mga added this to the 4.0 milestone Jun 30, 2020
akien-mga pushed a commit to akien-mga/godot that referenced this issue Jul 3, 2020
This reverts commit 481dbce.

Current fuzzy search implementation results in too many
non-useful results.

Could be re-added after result sort/filter/score functionality
is added. See godotengine#30072 for example existing implementation.

Fixes: godotengine#39128

Reverts: godotengine#32043

Fixed format style conflicts:
	editor/editor_help_search.cpp

(cherry picked from commit 55d706c)
huhund pushed a commit to huhund/godot that referenced this issue Nov 10, 2020
This reverts commit 481dbce.

Current fuzzy search implementation results in too many
non-useful results.

Could be re-added after result sort/filter/score functionality
is added. See godotengine#30072 for example existing implementation.

Fixes: godotengine#39128

Reverts: godotengine#32043

Fixed format style conflicts:
	editor/editor_help_search.cpp

(cherry picked from commit 55d706c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants