Comments (14)
much love @scambier
from obsidian-omnisearch.
Omnisearch does a token-based search, and the url https://foo.bar/baz
is actually read as https foo bar baz
. The highlighting reflects that.
Though I understand how it can be unexpected with this kind of usecase and will look to rework the highlight and "go to line"
(Might be related to #301 too)
from obsidian-omnisearch.
I've published a version 1.22.0-beta.1 last week that should improve the general highlighting.
from obsidian-omnisearch.
Yes, I also have the same issue like #301
Maybe optionally a list of regex that will always be searched as full string.?
So I could declared urls to always search not-token-based.
from obsidian-omnisearch.
This is now deployed in the 1.19.0-beta.1 version (if you use BRAT). I'll probably push it on the main branch within 2 weeks. You'll also need to clear your Omnisearch cache for a full reindex.
from obsidian-omnisearch.
@scambier Could it be that Obsidian changed smth? I cannot query for urls again...just noticed that right now.
I cleaed the cache and restarted and made sure I have all updates in.
from obsidian-omnisearch.
Nope, no change since the update that included this feature 🤔
from obsidian-omnisearch.
Okay, it seems to work most of the time but still not everytime.
see this example. What could the reason be? Would there be a way to add more weight to full matches? especially with urls?
from obsidian-omnisearch.
Still having these issues. Thanks for your time :-)
from obsidian-omnisearch.
hi, i also have this issue:
query: "normie.cc"
part of markdown file with match:
# contents
- main homepage with social icons + something custom
- https://kasper.space cool starry animated bg
- https://thedise.me nice background, social icons
- https://www.normie.cc cool greeting font
- [tinyclouds](https://tinyclouds.org) cool social icons
the highlights works somewhat properly when using in-file search though?
from obsidian-omnisearch.
I think the solution would be an option for an ignorelist.
Whenever I remove the https scheme for example it works.
I personally would just add https://github.com to the ignorelist so the search always only focusses on the remainder of the path.
example:
https://github.com/scambier/obsidian-omnisearch --> only searches for scambier/obsidian-omnisearch
@scambier Please please stop our suffering :-)
from obsidian-omnisearch.
i think a better solution might be rewriting the highlighting to support highlighting several matched tokens
from obsidian-omnisearch.
Just tried it out. Unfortunately no improvement so far. I deleted the cache and restarted + reindexed as well.
example :
Thank you for your continued pursuit of this issues. Really highly appreciated.
Maybe if it could just ignore a list of schemes?
from obsidian-omnisearch.
i from how omnisearch (and under the hood, minisearch) works, the whole query gets split into terms - many files have some of the terms from that url, but it happens so that the file with the full url has most terms, so it's at the top. the problem is, not all the terms are necessarily found one after another in the file, leading to the highlighting you see.
i think it could be worth exploring detecting urls in the search query, and adding custom highlighting logic if the query contains a url, to try to highlight most of it without interruptions.
it also could be useful to see if minisearch has some options which are relevant to this problem. (something like a locality or continuity bonus)
from obsidian-omnisearch.
Related Issues (20)
- [BUG] Omnisearch fails on Android when searching PDF even with the text-extractor cache on the device HOT 2
- [Feature request] Make any property of frontmatter a display name HOT 1
- No Omnisearch action on Android [BUG] HOT 5
- [BUG] Search fails… HOT 29
- [Feature request] Would it be possible to inject Omnisearch results into the edge browser HOT 4
- [BUG] TAB shortcut to switch from vault search to in-file search causes command palette closure if no result is provided in vault-search HOT 2
- [BUG] obsidian freezes on enabling the plugin HOT 14
- [BUG] Quotes around exact terms do not affect in-file search HOT 1
- [BUG] Does not return any results from OCRed images (Android) HOT 1
- [BUG] 1.20.3 cannot open file HOT 1
- [Feature request] Compatibility with Supercharged Links HOT 2
- [BUG] : Search does not find words with underscore `_` characters. HOT 3
- [Feature request] UX improvements HOT 5
- Restrict Omnisearch files or folders from appearing in search engine results [help wanted] HOT 1
- [BUG] Mobile - Omnisearch doesn't pull up the keyboard if triggered via the command pallette
- [BUG] inject results in Google has minor (CSS?) layout issues HOT 2
- [Feature request] Show URLs as links in the search results in instead of expanding the full context
- [Feature request] Force enable "Save index to cache" HOT 1
- Stronger boolean search with date range HOT 3
- Feature Request: Select folder for new notes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from obsidian-omnisearch.