Open
Conversation
This commit makes the search mode configurable between the existing pattern search mode and a new regex based search mode. The regex search mode can be enabled by setting the `MCFLY_SEARCH_MODE` environment variable to `regex` or by using the `F4` key in the UI. The regex syntax follows [crate regex](https://docs.rs/regex/latest/regex/#syntax). Invalid regex patterns will simply return no results. Fuzzy search is not supported in regex mode.
Author
|
Some thoughts on the implementation:
|
cantino
reviewed
Jan 18, 2026
cantino
reviewed
Jan 18, 2026
| ) | ||
| .unwrap_or_else(|err| panic!("McFly error: Successful create_scalar_function ({err})")); | ||
|
|
||
| db.create_scalar_function("regexp", 2, FunctionFlags::SQLITE_UTF8, |ctx| { |
Owner
There was a problem hiding this comment.
Is there any way this can be done natively in sqlite? Using a function call is likely why it's slow.
Author
There was a problem hiding this comment.
I did not find a way to do so while I was doing my reasearch on this.
But I am not very experienced with sqlite. Glad when I'm taught better.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PullRequest makes the search mode configurable between the existing pattern search mode and a new regex based search mode. The regex search mode can be enabled by setting the
MCFLY_SEARCH_MODEenvironment variable toregexor by using theF4key in the UI (see new entry in menu bar).The regex syntax follows crate regex. Invalid regex patterns will simply return no results. Fuzzy search is not supported in regex mode.
closes #278
closes #467