I will note that the Obsidian Search seems to be able to do such a thing perfectly (for example if I search for #tag1 and choose to give more context), it will give me the all the quotes (in their entirety) associated with that tag.
How can I get this functionality from Obsidian Search and put it into a Query?
Do you get what you want if you add the tags to the lines? You can comment them out if you don’t want to see them in reading mode.
"I think I think." %%#tag1%% ==< tag not shown in reading mode==.
"I think therefore I am." %%#tag2 #tag3%% ==< tags not shown in reading mode.==
"I doubt therefore I doubt I am." #tag1 #tag4 ==< tags shown in reading mode.==