[Developers] mql limit directive

brendan neutra brendan at metaweb.com
Wed Aug 29 18:22:43 UTC 2007


I read the documentation but I'm still not clear about this. So, I want to see 
buildings designed by American architects in San Francisco. I want to limit the 
number of buildings but not the number of architects. Since the buildings are in 
the outer clause I thought the limit would go there but when I run the query the 
limit is getting applied to the inner-architect clause, as well (I only get 2 
architects).

{
   "query":[{
     "address":[{
       "citytown":"San Francisco, California"
     }],
     "architect":[{
       "/people/person/nationality":"United States",
       "name":null
     }],
     "limit":2,
     "name":null,
     "type":"/architecture/structure"
   }]
}


Explicitly setting a limit in the inner clause (to, say, 100) doesn't change the 
result.  Inverting the whole query works (putting the buildings on the inside) 
but I was just wondering how this is supposed to work.

thanks!

Brendan


More information about the Developers mailing list