Skip to content
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

Obsidian query integration #324

Closed
gpQ4utjefs opened this issue Aug 1, 2022 · 16 comments
Closed

Obsidian query integration #324

gpQ4utjefs opened this issue Aug 1, 2022 · 16 comments
Labels
enhancement New feature or request is accepted and will be worked on Waiting for feedback

Comments

@gpQ4utjefs
Copy link

gpQ4utjefs commented Aug 1, 2022

Obsidian allow for query to search and output any string..

Syntax

image

Regarding osidian

  • Yes it is quite similar to Dataview but it is inbuilt and extremely quick
@dwrolvink
Copy link
Collaborator

You need to be a bit more specific than that. We are working on the dataview integration, is that something that you mean? #271

@dwrolvink
Copy link
Collaborator

Ooh that is pretty cool, didn't know that was a thing.

Do you use complex queries, or just a combination of keywords to search on? if the former, could you share some?

Quite a big feature. We have fuzzy search already, but that is in javascript, and not really usable for precompilation. Perhaps I can find a Rust/Go based fuzzy search util and use that to start offloading cpu intensive work to subprograms written in quicker languages.

@gpQ4utjefs
Copy link
Author

I mostly use simple queries like:
line:(foo bar)
tag:#work
But query can be extremely complex too -

@gpQ4utjefs
Copy link
Author

Any progress on this issue sir?

@dwrolvink
Copy link
Collaborator

I have not yet started, and when I do it will probably take some days before you get anything usable.
I have a busy weekend coming up and already not feeling that well so I think earliest that I start on this one is next weekend.

Editing existing features / bugfixes I often do in the evenings during the week, but for an entirely new one I want to really reserve some time to get a first setup going.

PR's always welcome of course.

@dwrolvink dwrolvink added the enhancement New feature or request is accepted and will be worked on label Aug 8, 2022
@dwrolvink
Copy link
Collaborator

So I'm pretty busy at the moment, not much time for coding I am afraid. Like always: low hanging fruit and bugfixes have priority, so this feature will be put on the back burner for now. Don't expect any progress on this the coming months.

dwrolvink added a commit to dwrolvink/obsidian-html that referenced this issue Sep 12, 2022
@dwrolvink
Copy link
Collaborator

A first mvp version was added:

https://obsidian-html.github.io/Demonstrations/Embedded%20search.html

Let me know if you still use obsidianhtml, and what kind of queries don't work / don't work as expected, or other usecases that you would want to see implemented.

Adding search results from within each matched note will be added next.

dwrolvink added a commit to dwrolvink/obsidian-html that referenced this issue Sep 12, 2022
dwrolvink added a commit to dwrolvink/obsidian-html that referenced this issue Sep 12, 2022
dwrolvink added a commit to dwrolvink/obsidian-html that referenced this issue Sep 12, 2022
dwrolvink added a commit that referenced this issue Sep 12, 2022
dwrolvink added a commit to dwrolvink/obsidian-html that referenced this issue Sep 12, 2022
dwrolvink added a commit that referenced this issue Sep 12, 2022
make path searchable, add andnot #324
dwrolvink added a commit to dwrolvink/obsidian-html that referenced this issue Sep 12, 2022
dwrolvink added a commit that referenced this issue Sep 12, 2022
@dwrolvink
Copy link
Collaborator

alright, it's starting to come together

matches from the note content are processed fairly okay now
just the matches from tags, title, etc are missing

https://obsidian-html.github.io/Demonstrations/Embedded%20search.html

dwrolvink added a commit to dwrolvink/obsidian-html that referenced this issue Sep 12, 2022
dwrolvink added a commit that referenced this issue Sep 12, 2022
@bhickta
Copy link
Contributor

bhickta commented Sep 15, 2022

Matches form tags are not working properly

Example

if we search #tag/subtag, it gives output as if tag and subtags are different words. That is it gives output for search for individual words "tag" and "subtag"

Appreciation

  • Great feature

dwrolvink added a commit to dwrolvink/obsidian-html that referenced this issue Sep 16, 2022
dwrolvink added a commit to dwrolvink/obsidian-html that referenced this issue Sep 16, 2022
dwrolvink added a commit that referenced this issue Sep 16, 2022
 implement searching specific tag #324
dwrolvink added a commit to dwrolvink/obsidian-html that referenced this issue Sep 16, 2022
@dwrolvink
Copy link
Collaborator

Alright, it should be possible to search for specific tags now, see

It does still have a bug that in a normal search, it will show tags twice sometimes, I'm working on that.

This was a bit harder to implement than that I had expected, so just happy to get this out already.

@bhickta
Copy link
Contributor

bhickta commented Sep 17, 2022

Issue: Not giving integrated search i.e. search for specific pattern only
If i query for "#london/hotel" or "#london/hotel", it gives output as

  • lor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt london/hotel lor sit amet, consectetur adipiscing elit
  • voluptate velit esse cillum london/hotel dolore eu fugiat nulla pariatur
  • idunt ut labore et dolore magna hotel aliqua. Ut enim ad minim veniam
  • sunt in culpa hotel qui officia deserunt mollit anim id est laborum
  • enim ad minim veniam, quis nostrud london exercitation ullamco laboris

What i think it would give

  • lor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt london/hotel lor sit amet, consectetur adipiscing elit
  • voluptate velit esse cillum london/hotel dolore eu fugiat nulla pariatur

@dwrolvink
Copy link
Collaborator

I've tried to implement this, but whoosh does not parse lookarounds properly, so my hands are tied at the moment.
A workaround would be to just use tag:#london/hotel instead of #london/hotel. Should give you the same results in Obsidian and the desired result in ObsidianHtml.

@bhickta
Copy link
Contributor

bhickta commented Sep 18, 2022

tag:#london/hotel, this is not working too. It gives same result as #london/hotel

@dwrolvink
Copy link
Collaborator

Works for me. See https://obsidian-html.github.io/Demonstrations/Embedded%20search.html#!search-for-a-specific-tag when searching for tag:#babayaga it only finds that tag, and not tag bla/babayaga.

When is the last time you've pulled new code?

@dwrolvink
Copy link
Collaborator

Closing due to lack of feedback

@markfaine
Copy link

Is this feature dead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request is accepted and will be worked on Waiting for feedback
Projects
None yet
Development

No branches or pull requests

4 participants