scambier / obsidian-omnisearch

A search engine that "just works" for Obsidian. Supports OCR and PDF indexing.
GNU General Public License v3.0
1.16k stars 57 forks source link

[BUG] : Search does not find words with underscore `_` characters. #341

Open namtrah opened 8 months ago

namtrah commented 8 months ago

Problem description:

As a developer, I have many words in various forms where it uses Snake Case for words. Trying to search for the exact word doesn't find it at all, and separate words finds it (with lower hit rate).

This could be an issue with Mini-Search, but IDK. I cannot recreate with their test tool (incorrect data)

Your environment:

SYSTEM INFO: Obsidian version: v1.5.3 Installer version: v1.5.3 Operating system: Windows 10 Pro 10.0.19045 Login status: logged in Catalyst license: insider Insider build toggle: on Live preview: on Base theme: dark Community theme: Blue Topaz v2023112601 Snippets enabled: 43 Restricted mode: off Plugins installed: 47 Plugins enabled: 47 1: Folder Note Core v1.3.5 2: Dataview v0.5.64 3: AidenLx's Folder Note - folderv component v1.0.0 4: AidenLx's Folder Note v0.16.5 5: Divide & Conquer v1.0.0 6: Advanced URI v1.38.1 7: Better Word Count v0.10.0 8: Buttons v0.4.19 9: Calendar v1.5.10 10: Chat View v1.6.0 11: Customizable Sidebar v2.2.1 12: CustomJS v1.0.18 13: Dynamic Highlights v0.3.1 14: Editor Syntax Highlight v0.1.3 15: Force note view mode v1.2.2 16: Ghost Fade Focus v3.0.0 17: Homepage v3.6.0 18: Activity History v0.1.4 19: Banners v2.0.0-beta 20: Heatmap Calendar v0.6.0 21: Admonition v10.1.1 22: Kanban v1.5.3 23: LanguageTool Integration v0.3.6 24: Limelight v1.1.0 25: Longform v2.0.4 26: Markdown Attributes v1.2.2 27: Open vault in VSCode v1.2.2 28: Text Format v2.4.0 29: Text Snippets v0.1.2 30: Vault Statistics v0.1.3 31: Workspaces Plus v0.3.3 32: Style Settings v1.0.7 33: Snippet Downloader v2.0.1 34: Pandoc Plugin v0.4.1 35: BRAT v0.8.3 36: Icons v0.3.0 37: Iconize v2.10.0 38: Icon Shortcodes v0.9.7 39: Hotkey Helper v0.3.18 40: Advanced Tables v0.20.0 41: Excel to Markdown Table v0.4.0 42: Highlightr v1.2.2 43: Fountain Editor v1.1.2 44: Typewriter Mode v0.0.4 45: Emoji Shortcodes v2.2.0 46: Templater v2.1.0 47: Omnisearch v1.21.0

Number of indexed items: 909 Notes

Things to try:

scambier commented 7 months ago

I've fixed a bug in the latest release that should solve your problem. Can you confirm it works?

LeonGr commented 6 months ago

I've fixed a bug in the latest release that should solve your problem. Can you confirm it works?

Not the OP, but the problem does not seem to be solved for me. I'm using version 1.21.1

scambier commented 5 months ago

I just did a quick test and it (mostly) works for me. There just seems to be an issue that is specific with tokenization of `inline code`. i.e. `foo snake_case bar` will work, but not `snake_case`.