Check out mikkels post on the subject
Today we have also been able to extend the query api to reflect this ontological change. We also agreed to add proper support of nested queries that truly makes the search api powerful. Biggest issues remaining currently are in the area of live queries. Here is a very good example of a real world ;) use case. By the way, using Gobby (gnome application) makes document collaboration astonishingly easy.
<!--
Maybe we could try to draft a spec as well? Maybe just some notes?
Because it's still not really clear what everyone up to because everyone is up to slightly different things.
-->
<!--
Match all documents with keyword "biology" which author comes from the
same country as any person with name Jim.
-->
<query content="xesam:Document" hitFields="xesam:title, xesam:author/xesam:givenName">
<and>
<equals>
<field name="xesam:keyword"/>
<string>biology</string>
</equals>
<equals>
<field name="xesam:author/xesam:country"/>
<field name="xesam:author/xesam:birthdate"/>
<query content="xesam:Person" hitFields="xesam:country, xesam:birthdate">
<and>
<equals>
<field name="xesam:givenName"/>
<string>Kim</string>
</equals>
<equals>
<field name="xesam:gender"/>
<string>male</string>
</equals>
<greaterThan>
<field name="xesam:birthdate"/>
<date>1979-12-24</date>
</greaterThan>
</and>
</query>
</equals>
</and>
</query>