pashashocky / obsidian-note-gallery

A masonry note gallery for obsidian.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Path appears to be ignored

macbikegeek opened this issue ยท comments

Obsidian search string of

path: "๐Ÿ“บ TV Shows" tag: #to-watch

returns one note which is in the ๐Ÿ“บ TV Shows folder and has the #to-watch tag. There is another file in the folder without the tag which is not displayed.

```note-gallery
query: 'path: "๐Ÿ“บ TV Shows"'
query: tag:#to-watch
sort: asc
debugQuery: true
limit: 15
```

returns all notes in my vault with the tag #to-watch, including the correct one in ๐Ÿ“บ TV Shows.

I've tried multiple permutations with and without the single and/or double quotes and space after path:. Most return the same result set while a couple return an error.

commented

@macbikegeek it's a little difficult to help you debug your issue as I don't see what question is being asked. Based on reading your issue, I feel that everything you mention is operating correctly.

In your first search string you are asking for path: TV Shows AND tag: #to-watch. Obsidian will only return the note matching both of those filters.

In the code-block you provided as an example, you have query defined twice, so the second one is taking precedence...

You should try to build your query with the obsidian search menu or use debugQuery: true. Please, let me know if you figure it out or what you want exactly...

The correct syntax is query: 'search string', for example:

~~~~note-gallery
query: 'path: Atlas tag: #test'
debugQuery: true
~~~~
SCR-20240205-ujgi

Thanks, I mistook the examples that show multiple query lines as meaning each element of the Obsidian query syntax needed to be in a separate query string. Thanks for the clarification - with both path and tag in the single query string the query is working as expected. Thanks for the awesomely quick response!