-
Notifications
You must be signed in to change notification settings - Fork 197
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
Expose the Obsidian search parser or functionality #22
Comments
I agree we should eventually expose some of the search & result rendering APIs. Right now it is fairly difficult because they are fairly specialized for the use cases we need, so the API is quite specific and confusing for the general use case. The other design challenge is the entire performance optimizations mixed in with the API; Obsidian's search uses many javascript and DOM tricks to avoid freezing the app when searching through thousands of files, which makes exposing this even more complicated. I will look into this eventually though, just hang tight. |
Perhaps at least if search functionality isn't exposed, then certain filters on |
I'm personally ok with even a softer version of that: it'll be helpful even if just the parsing is exposed, e.g. I'll supply functions to check if a |
If I could write searches and save results from my code, then that would enable a plugin for incrementally processing notes! Right now I need to search in Obsidian, copy the results to my clipboard, paste into Excel, and then run the code. Ideally, I would be able to collapse the last three steps into the second step. https://twitter.com/roberthaisfield/status/1413561714205888514?s=21 |
@classicrob that sounds a bit like the incremental writing plugin (https://github.com/bjsi/incremental-writing). It uses the obsidian search to add notes to a queue, but not sure how it does that |
@esm7 @lishid in obsidian 3d graph, a custom search input is built to get builtin obsidian search result. By combining reset function, I made |
It can be very valuable if the API would allow plugins to use the Obsidian note search syntax.
For example,
Vault
could have asearch(query: string)
method that returns aPromise<TAbstractFile[]>
for the results of the search represented byquery
, which might include Obsidian search operators liketag:
and others.As of today, plugins wishing to implement a file search box currently need to duplicate this functionality, which is unfortunate because the query options that Obsidian supports make a powerful tool, and we rather use the same syntax in plugins.
As a nice bonus, it would be great to have a
FileSearchQuery
text box component that would show the user tips as in Obsidian's Find in Files pane and Graph View.The text was updated successfully, but these errors were encountered: