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

Bug: tag search matches on incomplete search terms in source #1

Open
jugaltheshah opened this issue Jun 15, 2022 · 1 comment
Open

Comments

@jugaltheshah
Copy link

jugaltheshah commented Jun 15, 2022

Came across a strange issue in using search-notes:

In my markdown file, I have a tag, #reviewfodder. I searched for it with the string "tags:reviewfodder" and it properly returned a hit for the file, but under the Hits section I noticed it seems to have matched on reviewfodd. Indeed, if in the matched markdown file, I remove a letter from the tag, i.e. #reviewfodde and search using the same query as before, "tags:reviewfodder", it still comes back with the same match. I confirmed that the file had no other strings #reviewfodder it should have matched on.

I thought there might have been an issue with the tag length so I tested this with another string but oddly it did not display the same behavior. For example, I put the tag #abcdefghijklmno in my markdown file and searched using "tags:abcdefghijklmno" -- this produced 1 result as expected. I then removed the last character, i.e. #abcdefghijklmn and repeated the search for "tags:abcdefghijklmno" -- this also correctly produced 0 results, as expected.

Not sure why it sometimes does incorrect / partial matching, but thought I'd report it.

@alexkrolick
Copy link
Owner

This may have to do with the tokenizer used by the search engine. It tries to understand different word forms to some extent to do fuzzy matching.

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