Freebase MQL VS Freebase Suggest (n:type) in results
i'm try to get results from freebase using mql, for example:
ht开发者_JAVA技巧tp://api.freebase.com/api/service/mqlread?query={"query":{"name~=":"Barack","name":null,"type":[],"limit":1}}"
And as expected i'm get much types for this topic(Barack Obama).
But when i try to search "Barack" with freebase suggest i'm get only one (n:type or notable type)type for "Barack Obama" - US President. Example: http://www.freebase.com/private/suggest?prefix=barack
My question is - how can i get the same result as suggested using only MQL?
You're pretty much there with the second link you found - it's now just a matter of combining the two queries:
http://api.freebase.com/api/service/mqlread?query={"extended":true,"query":[{"name~=":"^Barack","id":null,"name":null,"type":"/common/topic","notable_for":{}}]}
Hope this helps!
精彩评论