Help with query syntax

In 0.10.2 we now have embedded queries. Is there a guide anywhere that covers the basic syntax of queries that can be used here ?

1 Like

it’s the same syntax you can use in regular search.

I’d like to be able to sort my embedded searches as I can regular ones. Is there a syntax for doing this?

I really like the idea of embedded searches. My workflow consists of a lot of ‘Parent’ pages that link to small notes. Being able to have a big blok of all related pages (by tag) at the end would be really cool.

Being able to control the output would also be amazing! I would like to create a cloud or list of pages where a tag is mentioned like:

search: #tag
Results:
> Page X
> Page Y
> Page Q

Or in a ‘running output’ like:

Results:
Page X, Page Y, Page Q

I guess my question now becomes is there documentation somewhere which describes the syntax we can use in regular searches :wink:

2 Likes

yes, it’s in the help vault included in Obsidian

open a feature request for that

@WhiteNoise should I throw this in a feature request or is this already on a roadmap (:

open a feature request

2 Likes

I’m new to Boolean search. I checked out the help vault, but I’m unable to understand how to perform a query for tags using boolean operator.

tag: #tag1 AND #tag2 

returns the results of search for the word “and” as well, and not just the notes that contain both these tags. Is something wrong with my syntax?

Also, how can I perform a boolean search using the core-plugin search feature?

Thanks!

According to the documentation the “and” is the space character by default.

tag: #tag1 #tag2

Would be the correct syntax for matching FILES that have both tags.
There is only the “OR” keyword and “-” for exclusion.

tag: #tag1 OR #tag2

Would match all FILES that have either tag

tag: #tag1 -#tag2

Would match all FILES that have #tag1 but NOT #tag2

Be aware that the matching only works on a file basis correctly.
For tags within the document it will show all the lines where EITHER of the tags show up.
(Not sure if that is intended or not)

As far as i know the queries use the search core-plugin.
Search/Query Documentation

1 Like

Thank you! This is helpful!