What would be the best way to ask this complex query in the search box?

Hi. I’m thinking of tagging my academic notes with tags in order to find them more easily.

I want to get, in the search box, a list of all the authors that write about a certain topic.

For each paper I talk about, I make a master document that gets linked from any talk or mention about the paper.

The head paper would have the following entries:
AUTHOR: [[Author’s Name]] or [[Author - Author’s Name]]
TOPIC: [[Topic node]] or [[Topic - Topic descriptor]]

I would like to search all the authors that write about a specific topic. This is my graph database logic:

 (a)NodeType:Author -|wrote|->
 (b)NodeType:Paper -|is about|->
    NodeType:Topic AND b.title:[[Specific topic I query]]
return a.map(node => node.title)

Some Javascript pseudocode for the logic if documents were JSON objects instead of markdown:

  .filter(paper => paper.topic === myTopic)
  .map(paper => paper.author)

And some more realistic JS code if I had taken the time to make a parser:

const relevantAuthorsRaw =
    .filter(n => hasLinkToNode(document, myTopicDocumentTitle))
    .map(n => (new RegExp("AUTHOR: \\[\\[(.+))\\]\\]")).match(document)[1]);
const relevantAuthors = uniq(relevantAuthorsRaw)

What would be the most feasible way to achieve this using Obsidian? If not by using node-linking logic (which I didn’t see any on the Search help page), how would it be achievable by tags?

(short of tagging each paper as #topics/MyTopic/authors/MyAuthor, because then

  1. authors could not have multiple topics
  2. looking for authors would require looking for the topics in all cases, even those where the topic is irrelevant.)

In my opinion, Obsidian could profit from some graph query logic in the search for node relationships.