hadynz / obsidian-sidekick

A companion to identify hidden connections that match your tags and pages
134 stars 9 forks source link

Bug: Stemming (?) mishits #12

Closed HEmile closed 2 years ago

HEmile commented 2 years ago

It is reporting many instances of search mishits, where hits could not be found in the index. They probably come from some stemming issue, although I wouldn't know what word it would be based on because I'm fairly sure I have no single-word titles/aliases like 'achieve', 'approximate', 'allow'... etc.

image

In general, it might be a good idea to make the stemming optional, I'm getting a lot of hits now.

hadynz commented 2 years ago

At the end of the console.warn that is being printed, your entire Obsidian index should be included. Do you mind if you share that? It would be interesting to see what's there, and if we can see the source of these misses.

HEmile commented 2 years ago

I was just about to, haha. image

Here it shows some examples. It seems like the stemming cuts off some parts of the name rather arbitrarily?

HEmile commented 2 years ago

Example for paramet (which was not found) image

HEmile commented 2 years ago

And similar for 'approx' image

hadynz commented 2 years ago

Thanks for the screenshots. It will help me with recreating this problem at my end.

Stemming and the current lack of ability to highlight multiple words (#10) means that valid keywords that should be highlighted are not being highlighted. It doesn't explain why there are mishits though. But I have to go back to the drawing first to resolve the multiple words issue first.

Let me continue to mull over this. I'll keep you up to date with my progress.

HEmile commented 2 years ago

Thank you, it makes sense that it would give these issues if it cannot deal with multiple words, i suppose (I actually noticed that issue too in my vault).

hadynz commented 2 years ago

@HEmile Just released 1.2.0 which drops the concept of stemming and uses a very different algorithm for searching that I think is more appropriate for this plugin's use case (see #14 for details).

Give it a spin and let me know

HEmile commented 2 years ago

No more errors, and the results look a lot better! Thank you :)

HEmile commented 2 years ago

I've played around with it a bit and it's super useful! With better performance I'm convinced it'll be a key part to my setup, thank you so much!