scambier / obsidian-omnisearch Goto Github PK
View Code? Open in Web Editor NEWA search engine that "just works" for Obsidian. Supports OCR and PDF indexing.
License: GNU General Public License v3.0
A search engine that "just works" for Obsidian. Supports OCR and PDF indexing.
License: GNU General Public License v3.0
Hello again @scambier !!!!
Thank you very much for the features from #25 . I really need the quotation marks ” “
MY FR: Would be possible to add a hotkey when the modal in open to quickly add the quotation marks ” “
in the search text field
➡️ The caret cursor is between each quotation mark :)
🔠 My Suggestion is the TAB
key as a hotkey
Let me know what you think
Thanks for reading this!
Have a great day!!!!
Is your feature request related to a problem? Please describe.
I'm always frustrated that FTS in Obsidian embed search is very slow
Describe the solution you'd like
Would be great to utilise FTS index for alternative embed block
Describe alternatives you've considered
No alternatives so far
Additional context
This API can be used for creating such block processor: https://marcus.se.net/obsidian-plugin-docs/api/classes/Plugin_2#registermarkdowncodeblockprocessor
we have a search for the current file, and for the whole vault. A middle ground to search only a specific folder might also be quite useful? 🤔
Hey! I went to install this with brat and I get the following error:
BRAT: scambier/obsidian-omnisearch
The release is not complete and cannot be download. main.js is missing from the Release
Thank you for the great plugin! I've been testing it out, and I especially appreciate that it functions similarly to the native Quick Switcher.
Currently, the hotkey to "Open in a New Pane" is set to Ctrl + Return, but the Quick Switcher default on Mac for "Open in a New Pane" is Command (⌘) + Return. Would it be possible to have the option to use the Command key instead of Control?
Edited to Add: I think the Better Command Palette plugin sets the hotkeys based on OS, but JavaScript is foreign to me so I'm not entirely sure how it does it.
Problem description:
1、Search any word in Non-En language especially CJK language sentence , only words at the beginning of a sentence can be retrieved.
like
这里利用的是维基百科的结构化知识,加上后两者足够有效精确的知识导向。尝试用一个番茄钟内得到的知识输出成一个很小的文档或者思维导图。然后根据里面的内容利用费曼技巧进行学习。
when I wanted to search the 精确
,nothing showed.
Your environment:
Just to preface, I don't want to sound demanding or inflexible, I plan to help out with the development after there's been discussion on how much of these features are appropriate.
Imo, the search improvements of this plugin are wonderful yet half the battle. Making Omnisearch truly "Omni" for all of Obsidian would require unifying the Command Palette and Quick Switcher and the best parts of their various plugin counterparts.
There are quite a few search oriented plugins out there, here are features I've found useful in some of them:
General CP+QS+Obsidian:
+
(but doesn't allow styling or creation+renaming like Workspaces Plus's "Open Workspaces Plus" command1)@
or just headings with #
edt
(mainly useful for Sliding Panes users who have many panes open at once)/
#
I welcome feedback on this of course, but here are my thoughts...
We have several different categories of things that can be searched: text, symbols (tags, headings, links, embeds), files (markdown and non-markdown) , commands, views, workspaces, and vaults. I could add to that list snippets and plugin settings, since those are searchable through the settings menu.
Also, we have 2 styles of exclusions. Hiding (from Better Command Pallet) makes the query result invisible, and its visibility can be toggled. Excluding files and directories (built in to obsidian) simply downranks results.
Rather than adding and having to remember 10 different query starting symbols (like the ones mentioned above and in #2), my thought is this:
local
and global
system
mode by typing ;
(or >
from text editors like VS Code)local
and global
using the tab key (since it is both easy access and next to useless while searching) or by clicking a toggle at the top of the modal. This toggle will visually indicate which mode you're in whether tabbing or clicking.system
mode and files in global
modeThe categories can be queried as follows:
local
and global
global
only) and content, unifying search and Quick Switcher# heading
or ### heading
4#tag
(no space)!
[
system
modesystem
mode (only if enabled in settings);
(e.g. ;;Vault
)png.image
or pdf.book title
png:image
Recency functions differently for different items. All text search should incorporate file recency into its ranking, both search recency (higher priority) and modification recency (lower priority). Recency would of course have lower importance than text matching.
All other recency would function as you'd expect (most recent command, view, plugin, etc.), but it should be configurable how many to limit to in the settings - maybe I only want the 3, 5, or 10 most recent (or 0 for all).
Symbols will simply be up-ranked above text results, not filtered-for. Since there are (uncommon) cases you may be searching for text starting with those symbols, their could be a setting/command to toggle symbol up-ranking. But I can't imagine anyone legitamately searching for something starting with any of those symbols, like #1
. Exclamation marks could be in search but likely with text preceding them, and brackets are also uncommon (the user would be more likely to search the text within brackets anyhow). ↩
headings could be searched and ranked according to the number of #
s in the query. I.e. heading results would be ranked with level 1 at the highest and 6 at the lowest, but a query like ### abc
would downrank levels 2 and 1 ↩
This is a fantastic plugin! One thing I miss from the default quick switcher though is having notes that don't exist yet showing up. In other words, notes that are [[linked]]
from somewhere but haven't been created yet. I find that really useful to make sure my new notes are linked into existing references to something.
While searching for files aliases are not taken into account. Would it be possible to extend the search ability to aliases too?
Problem description:
When typing by input method editor (IME) in a modal input (e.g. triggered by a Capture command), if enter is hit, the text is submitted immediately.
To Reproduce
Here you can see I typed test
in the IME, then I pressed enter, I intended to insert test
in the input and continue typing, but the input was submitted and the file is opened.
Additional context
In CJK IME, when enter is hit, it means to insert the text without converting it to the CJK character, this is a common trick to insert English words without turning off the IME.
By listening to Element: compositionstart event - Web APIs | MDN,
we can determine whether the enter key means to insert text or submit.
Here's a snippet I used in my projects:
interface CompositionState {
lock: boolean
}
export function lockInputMethodComposition(el: HTMLInputElement): CompositionState {
const state: CompositionState = {
lock: false,
}
el.addEventListener('compositionstart', () => {
state.lock = true
})
el.addEventListener('compositionend', () => {
state.lock = false
})
return state
}
const nameInputState = lockInputMethodComposition(nameInputEl)
nameInputEl.addEventListener('keydown', async (e) => {
if (e.key === 'Enter' && !nameInputState.lock) {
e.preventDefault()
// do things like submit the input here
}
})
Reference: dom events - What is JavaScript's CompositionEvent? Please give examples - Stack Overflow
Your environment:
Problem description:
"In-file search": If note is 'pinned':
Opening a search hit with 'return' opens the note a second time (a duplicate of the note)
Problem description:
Pressing Enter on an omnisearch modal result will jump to it as it should, but will also insert a return character at the start of the result line, editing the document with an empty line in the process
Your environment:
Is your feature request related to a problem? Please describe.
When I want to refer note, I need to
Describe the solution you'd like
If I can search the content by use trigger like [[
or @@
in obsidian and then enter to link it, it will be super easy for me to link my note.
Describe alternatives you've considered
If I can search note and then quick copy the name.
Additional context
Type of issue
Problem description
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'path')
at extractField (eval at <anonymous> (app.js:1:1444405), <anonymous>:81:20678)
at i.remove (eval at <anonymous> (app.js:1:1444405), <anonymous>:81:9471)
at Ju.removeFromIndex (eval at <anonymous> (app.js:1:1444405), <anonymous>:81:24393)
at eval (eval at <anonymous> (app.js:1:1444405), <anonymous>:81:23506)
at t.e.tryTrigger (app.js:1:847067)
at t.e.trigger (app.js:1:847000)
at t.trigger (app.js:1:862754)
at t.onChange (app.js:1:854785)
at e.trigger (app.js:1:1262339)
at e.<anonymous> (app.js:1:1253968)
The error did not appear after deactivating Omnisearch
Your environment
I have a nightly process that creates a daily note and moves the previous days one to a different folder. How does omnisearch handle this?
Hello @scambier !!!!
My FR is about the modal behavior when we have more than one match in the same note.
Example: my Chicago Bulls.md
has 4 entries for the term Michael Jordan
Would be very helpful to have each math visible and separated in the modal:
This FR would an productivity if combined with #5
Thank for reading this :)
Have a great day!!!!!
This plugin would benefit greatly from being able to ignore files and folders (e.g. I have a song library that I'd like to exclude from searching). Ideally, starting a search with a character (specified in settings, potentially '?' by default) would search without exclusions.
There could be a toggle for each ignore to use regex or a plain file path
Type of issue
Problem description
When the plugin is installed and enabled, it pops up the word "3" on a new alert box. I didn't know it was from this plugin, and I had to do divide and conquer on all the plugins that I have installed, and I have narrowed it to this plugin.
As soon as I enable this plugin on my community plugins setting, it will pop up the number "3", as well as on startup.
Your environment
Currently, when trying to create a page with the :
character, OmniSearch silently fails. It would be nice to get a notification. Super low priority though, just polish.
Now that your plugin is publicly available, it won't install and obsidian keeps on erring with "Failed to load plugin manifest"
Thanks
Problem description:
When this plugin is active, the "loading workspace" of Obsidian startup it takes an extra 10-30 seconds.
It seems that this plugin's onload() is building an index and reads all files in the vault to do so; patching main.js to run the onload method body inside an onLayoutReady() callback defers the index load and event handler setup to after the workspace is loaded, allowing them to run in the "background" instead of blocking Obsidian startup.
Your environment:
Hello @scambier !!!!1
Fantastic idea !!!!
My FR is simple to explain: when opening a note using Omni Search, would be amazing uf the caret cursor jump to the search element when opening the note :)
This feature would make very easy to navigate/find the content that we type in the modal for long notes !!!!!
Thanks for reading this !
Have a great day!!!!
Is your feature request related to a problem? Please describe.
Being used to vim controls, it'd be nice if you can use them to navigate this the suggester of this plugin, too.
Describe the solution you'd like
Map ctrl/cmd j or k
to navigate down/up, like the Another Quick Switcher plugin does.
Describe alternatives you've considered
well, arrow keys work, but aren't as convenient.
Additional context
Mostly for vim users. not a high priority request, but a nice QoL improvement.
Problem description:
I have v1.0.1
Trying to update to v1.2.0 using the default obsidian addons manager doesn't work. Installing popup comes up, but the version stays the same, and then when you check again for updates the v1.2.0 update appears again.
I have tried uninstalling the addon, then redownloading, but it is still v1.0.1
Your environment:
I have the embed ![[Diving Store]]
in one of my MD files.
OS does find the original Diving Store
file, but not the file containing the embed.
Would be great if you could enhance the findings.
Thanks for your consideration.
I work extensively with several panes open -- I have two main panes open in the main view and one on the left and one on the right sidebar.
Sometimes I need to search "locally" and would like not to search the whole vault or have to search every single pane, but rather have the option to search the current ( temporary ) workspace
/ view
.
Thank you for your consideration.
Problem description:
Omnisearch is unable to open notes which contain a #
character in the filename. Instead, a new note is created. Obsidian's built-in Quick switcher is able to open files with # in filename successfully.
I can recreate the problem like this:
Crazy #hashtag time!
Crazy
and this note is the first matchreturn
to open this noteCrazy
Here's a screencast showing 1) Omnisearch creating a new note instead of opening the note Crazy #hashtag time!
, and 2) Quick switcher opening this note successfully.
I expect Omnisearch to open the note Crazy #hashtag time!
, not to create a new note named Crazy
. A new note should only be created when typing Shift-return
.
I know Obisidian recommends not using #
character inside note titles, but I have imported many notes from other sources and some contains #
. Although it's a rare edge case, it's probably easy to fix?
Your environment:
when use shift + enter
to create new file, it locate at root directory of repo, but I expect new file should create in specific directory, which is obsidian setting
-> Files & Links
-> Folder to create new notes in
A basic settings page, with
More settings to add later, and to be defined in new issues
Since 0.2.0 changed the yellow highlights to bold, it's no longer possible to tell which part (if any) of the result's title matches the search term, because the entire title is bold. In my opinion this is a regression and hampers navigation. Personally, I didn't mind the yellow (would probably re-enable it if there was an option for it) but if you really don't want color, please use some other indicator like underline to show a match in the page title :)
it jump to file with last view position instead of matching line, which is quite inconvenient.
Type of issue
Problem description
Trying to enable the plugin completely freezes Obsidian. No console logs obtainable, cause Obsidian simply freezes. Restarting Obsidian lets Obsidian freeze at the startup screen. Only way to resolve this was to manually delete the plugin from the list of enabled plugins in .obsidian/community-plugins.json
.
Your environment
macOS 12.2.1
Obsidian 0.14.2
Number of notes in your vault:
# ran in vault root
find . -type f | wc -l
6338
Other plugins that may be related to the issue:
None, I tried disabling all plugins, the issue still occurs.
Problem description:
When selecting the plug-in in the plug-in browser in order to see the README and to install it I get an error message and see nothing. For matters of humor I post the screenshot below 😉 All other plug-ins (installed and not installed work well in the plug-in browser)
Your environment:
Is your feature request related to a problem? Please describe.
I would like to have a filter for exact phrases and to discard words
Describe the solution you'd like
-Use quotation marks for exact phrases
"antique car"
-Use hyphen to discard notes containing unwanted words
"antique car" -1970
Describe alternatives you've considered
For discards NOT could be used
"antique car" NOT 1970
Running with the latest omnisearch and Obsidian version.
Thanks for this plugin freeing me from the small sidebar using the regular search :-).
I understand you prioritize results with the search-term in the page name above others and that seems fine ... but I wander how the find-results that do not have the search-term in the pagename are sorted.
I would expect it to be sorted on matched as when a search-result is found multiple times in a page it should (IMHO) be presented higher on the list of search results then a page that has the search result on once in the page.
But currently it does not.
Partial word match not displayed as a result
When searching for the middle or end of a term, the search does not display it as a result.
Steps to reproduce
New note
Search
Obsidian search
Environment:
P.S: Awesome plugin!
This is particularly useful when searching through daily notes, and have them chronologically.
When searching for tags in the format of "#tag", a regular fulltext search is performed for notes which contain the word "tag". It would be extremely handy if tags were indexed separately and a search for "#tag" would yield notes with this tag first.
Type of issue
If I use Omnisearch, navigate with the arrows to a result, press Alt+Enter to expand and go back with Esc, arrow navigation completely stops working.
Not just for that dialog, but for all subsequent opens of Omnisearch until Obsidian is restarted.
Your environment
Currently Omnisearch doesn't work with BRAT as it's missing a manifest.json
https://github.com/TfTHacker/obsidian42-brat
Right now, the plugin does not add any html classes, so the prompt simply inherits what the styling the themes do for prompts (= Quick Switcher / Command Palette).
However, as search is quite a different use case from selecting commands/files, it would make sense to style the the modal differently. To be able to do that, the plugin's html needs some plugin-specific css-classes.
When I search for "zlutoucky", I would like to be able to find "žluťoučký", and vice versa. These results should have a lower relevancy/priority. Would this be possible?
Type of issue
Problem description
I'm trying this out after seeing it on this reddit thread because search has been one of the issues I've had with Obsidian. I setup hot keys to use omnisearch for both in-file and vault searches.
Vault search works well, which is what I really wanted. I tried in-file too, but when I navigate to a search result, and press enter, it takes me to a different file. It seems to something that would match the vault search. If I instead point and click on the search result, it goes to where I'd expect it.
Searching:
Result when pressing enter:
Result when clicking (I highlighted it afterwards for clarity)
Your environment
Android 11
Obsidian Mobile (Version 1.2.0 / API von 0.1.2))
Omnisearch (Version 1.2.0)
Number of notes in vault: 2967
Omnisearch V 1.0.1: Vault Search worked on mobile.
After update to Omnisearch 1.2.0 (and Obsidian restart) the plugin indexes the vault ("Indexed 2967 notes"), but doesn't show any results (always shows: "We found 0 result for your search here")
Type of issue
Problem description
I tried following the manual installation steps (downloading scambier.obsidian-omnisearch-0.2.3.zip from the releases page), unzipping, and then putting the folder in the obsidian plugins folder.
But when going into Obsidian to activate the plugin it doesn't seem to show up. Tried re-loading the plugins, restarting Obsidian, using a previous version of the plugin (0.2.2), but no luck :-(
Your environment
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.