jplattel / obsidian-query-language

An Obsidian plugin allowing you to query your notes
176 stars 6 forks source link

Search Results not returned from folder query unless it contains <space> #11

Closed enly1 closed 3 years ago

enly1 commented 3 years ago

Obsidian Version: 0.11.0 (Installer Version 0.9.20) Plugin Version: 1.5.0

Struggling for ages trying to get this plug-in to return any results. Hit bug #7 until I restarted, then that went away with a restart.

Using the following OQL statement, I received no results.

name: Persons
query: "'Glossary/'"
template: "list" # Renders to a list with notes linked
limit: 10

Renaming the folder to Glossary Folder and updating the query as follows results are returned correctly.

name: Persons
query: "'Glossary Folder/'"
template: "list" # Renders to a list with notes linked
limit: 10

No other changes in terms of content etc between tests.

Returning it to the original name results in no results.

Is this a bug, or a syntax issue ? The example snippets has an example with folder1 which I also tried and found it returned no results also.

Note, I also tried other template formats and added debug: true when it wasn't working and it reported no results.

enly1 commented 3 years ago

Okay - so its not a bug, its just that the examples don't appear to work with my setup.

Have read the fuse documentation and syntax details and can now get it filtering as I like based on path using "^Notes/Glossary" - works like a charm.

jplattel commented 3 years ago

Hey @enly1 glad you got it figured out! I'll update the information on the examples to be more explicit!

Also, the current version uses a cachedData property of a note, which might be empty at times. I'm currently upgrading the plugin to work better including a warning on startup if the indexing isn't done yet (which caused the search is undefined error that disappears on restart).