In my project I have a nested multi-level structure and I'm building a kind of D&D query builder where conditions from any level may be grouped together and any condition may be usued multiple times.
The easiest way form me to build complex queries would be if I could repeat nested queries with the same path but this seems to not work as I expected. Here's an example:

This query produces g.t1 = "term1" || g.t2 = "term2", but i would expect it to produce
g.t1 = "term1" && g.t2 = "term2".
I know I can combine this case under one nested query but this is just a simple example. In my real application, conditions are much more complex and trying to combine them under single nested query may be hard. Is there a way to achieve an AND condition with the structure I presented? If no, could anyone please give me a hint like to build such a complex queries?

Unfortunately rewriting the query as in suggested topic is impossible. The example I mentioned is the simplest case, in my application queries can get much more complex so rewriting them this way would be extremely hard, if even possible.