[Developers] mql limit directive

rawlatv at gmail.com rawlatv at gmail.com
Wed Aug 29 21:05:57 UTC 2007


When I run that query, I get two buildings, each with one architect. I feel like this is the expected result for that query. 

Is your query this? :
I want a list of all American architects who have designed  buildings in San Francisco along with a list (max length 2) of those buildings

...or is it this? :
I want a list (max length 2) of buildings in San Francisco that have been designed by American architects

The query in your email returns the second, whereas the inverted version that you said "works" would be the first I think. All in all, I don't see how the outer limit clause for buildings is affecting the inner architect clause. If a building had three architects, you would see three with this query even with limit=2. Am I misunderstanding something?

On 8/29/07, brendan neutra <brendan at metaweb.com> wrote:
> 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
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers
> 


-- 
:v


More information about the Developers mailing list