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

Advanced/partial word search #160

Open
LaBetonneuse opened this issue Oct 11, 2023 · 2 comments
Open

Advanced/partial word search #160

LaBetonneuse opened this issue Oct 11, 2023 · 2 comments

Comments

@LaBetonneuse
Copy link

LaBetonneuse commented Oct 11, 2023

Hello,

would it be possible to use wildcards like '?' or '*' for 1 or any number of characters respectively, in the word search? And another character to indicate the beginning or end of a word? ('|' in my examples)
=> "foob*r" would show "foobar", "foobr" and "foobaaar"
=> "f*b*r" would show "foobar", "foobr", "foobaaar" and "fbar"
=> "foob?r" would show "foobar" but neither "foobr" not "foobaaar"
=> "bar|" would show all words ending with "bar"
=> "|foo" would show all words beginning with "foo"
=> "|foobar|" would only show "foobar", not "ffoobar" or "foobarr"

Thanks. 😊

@rdoeffinger
Copy link
Owner

Well, a lot is possible.
But it's not easy.
The search is designed to be index based, which means about the same as looking up a paper dictionary, you open a page, check if you landed before or after the word you wanted and then flip back or forward.
That method simply does not work with wildcards or any other advanced search expression.
So it would need to be a completely new implementation, and it would have far worse performance.
So it's not something on my list of things I personally plan to work on.

@LaBetonneuse
Copy link
Author

OK, thanks. :)

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

No branches or pull requests

2 participants