Skip to content

Enhancement: #218 Fuzzy search for QuickOpen - #1307

Merged
matthijseikelenboom merged 20 commits into
mainfrom
pullrequests/activcoding/FuzzySearch
Jun 11, 2023
Merged

matthijseikelenboom merged 20 commits into
mainfrom
pullrequests/activcoding/FuzzySearch

Conversation

@Wouter01

@Wouter01 Wouter01 commented Jun 10, 2023 •

Copy link
Copy Markdown
Member

Description

This PR adds a new file, "FuzzySearch.swift", to the project. The file provides fuzzy search functionality for searching an array of URLs based on a query string. Also modified "QuickOpenViewModel.swift" to integrate the fuzzy search feature using the new 'search' function.

Note: Based on PR #1275 by @activcoding. This new PR has been opened to fix the Xcode project issues from the previous PR. See the old PR for more details.

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code
  • Implement the Levenshtein-Algorithm
  • performance testing to validate the efficiency of the fuzzy search algorithm
  • gather some feedback

tom-ludwig and others added 20 commits May 13, 2023 20:58
Every search result gets a score based on how many queryTokes are found in the file url, the proximity Score, the modifying date and the Levenshtein-Distance.
Signed-off-by: Tom Ludwig <83090745+activcoding@users.noreply.github.com>

# Conflicts:
#	CodeEdit/Features/QuickOpen/ViewModels/QuickOpenViewModel.swift
Conflicts:
	CodeEdit/Features/QuickOpen/ViewModels/QuickOpenViewModel.swift
Resolved the bug, where random files weren't displayed;
Spelling mistake corrected;
The problem was the the `calculateDateScore` function, returned a score of 0.0 for files that were never created or modified by the user(downloaded files for example). The date score got multiplied with the file score, and something times 0.0 equals 0 and consequently the items weren't displayed in the list🤦🏻‍♂️. I simply added `score + 0.01` which assigns a default score of 0.01 to each date score. However, there is a disadvantage: the search results are worse...
…uzzySearch

Signed-off-by: Tom Ludwig <83090745+activcoding@users.noreply.github.com>

# Conflicts:
#	CodeEdit.xcodeproj/project.pbxproj
…into FuzzySearch"

This reverts commit 42d5440, reversing
changes made to e67ff21.
…/CodeEdit into FuzzySearch""

This reverts commit a2108db.

Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
@Wouter01
Wouter01 marked this pull request as ready for review June 10, 2023 19:22
Comment thread CodeEdit/Features/QuickOpen/ViewModels/FuzzySearch.swift

@austincondiff austincondiff left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good. Great work @activcoding. I love how well it is documented!

@austincondiff austincondiff changed the title Pullrequests/activcoding/fuzzy search Enhancement: #218 Fuzzy search for QuickOpen Jun 11, 2023

@bombardier200 bombardier200 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I love the documentation! Will really help out in the feature! Great Work!

@matthijseikelenboom
matthijseikelenboom merged commit 3936cb4 into main Jun 11, 2023
@matthijseikelenboom
matthijseikelenboom deleted the pullrequests/activcoding/FuzzySearch branch June 11, 2023 18:40
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.

✨ Fuzzy search in open quickly overlay

5 participants