CodeEdit icon indicating copy to clipboard operation
CodeEdit copied to clipboard

perf(search): Resolved issue with SearchKit

Open tom-ludwig opened this issue 1 year ago • 2 comments

Description

This PR addresses an issue where the search algorithm was unable to process certain special characters (e.g.,, (, *, :). This limitation prevented users from finding content that included these characters in their queries.

For example, searching for "info": in a JSON file would not return any results due to this limitation.

Contents.json:

{
    "info": "xcode": {
        [...] 
    }
}

The fix in this PR corrects the search algorithm to handle these special characters, allowing users to successfully search for content that includes them.

Related Issues

na

Checklist

  • [x] I read and understood the contributing guide as well as the code of conduct
  • [x] The issues this PR addresses are related to each other
  • [x] My changes generate no new warnings
  • [x] My code builds and runs on my machine
  • [x] My changes are all related to the related issue above
  • [x] I documented my code
  • [x] fix tests

Screenshots

tom-ludwig avatar Apr 27 '24 18:04 tom-ludwig

Finally ready for review. It was tougher to come up with those 21 lines than the original 400. Good thing I found a bug during testing, which I've fixed now. Could you guys test some queries on your projects to make sure everything's working right?

tom-ludwig avatar Apr 29 '24 16:04 tom-ludwig

Might want to put some XCTests in place as well?

matthijseikelenboom avatar Apr 29 '24 18:04 matthijseikelenboom