<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Arthur van Hoff wrote:
<blockquote
cite="mid:A6F816F1BC86CC46A10618006196729602F09D5B@zsi-sbs01.ZSI.local"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Comic Sans MS";
        panose-1:3 15 7 2 3 3 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Comic Sans MS";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Comic Sans MS";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="Section1">
<p class="MsoNormal">I am trying to write a query to find the
broadcaster for a podcast
without inverting the query. I am guess that I can use “any_reverse”,
but the query below is not working for me and I can’t find a good
explanation of how it is supposed to work. Any suggestions on what I
might be doing
wrong?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">“query”: [{<o:p></o:p></p>
<p class="MsoNormal"> "name": "ABC News",<o:p></o:p></p>
<p class="MsoNormal"> "type":
"/user/cotton/default_domain/podcast",<o:p></o:p></p>
<p class="MsoNormal">
"/type/reflect/any_reverse": [{<o:p></o:p></p>
<p class="MsoNormal">
"optional":true,<o:p></o:p></p>
<p class="MsoNormal"> "name":
null,<o:p></o:p></p>
<p class="MsoNormal"> "link":
{<o:p></o:p></p>
<p class="MsoNormal">
"master_property":
"/user/cotton/default_domain/broadcaster/broadcasts"<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal"> }]<o:p></o:p></p>
<p class="MsoNormal">}]<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">PS: I know there is a back pointer
"/user/cotton/default_domain/broadcast/broadcaster”
which makes this easy, but I am trying to understand how to do it the
hard way.</p>
</div>
</blockquote>
Heh, yeah sometimes the hard way is the only way to go.. sometimes
programatically the only good way to phrase queries is with
any_master/any_reverse. You'll see that we do this when viewing the
properties of a particular topic in the filter view.. here's bill
clinton's education - Use firebug to find the the any_master phrase in
the MQL query:<br>
<br>
<a class="moz-txt-link-rfc2396E" href="http://www.freebase.com/view/filter/education/education?propertyId=%2Fpeople%2Fperson%2Feducation&topicId=%2Ftopic%2Fen%2Fbill_clinton"><http://www.freebase.com/view/filter/education/education?propertyId=%2Fpeople%2Fperson%2Feducation&topicId=%2Ftopic%2Fen%2Fbill_clinton></a><br>
<br>
You've got the right general idea though, and I think you've got
any_reverse mixed up with the wrong master_property... so you can
either use any_master and
/user/cotton/default_domain/broadcaster/broadcasts, or you can use
any_reverse with /user/cotton/default_domain/broadcast/broadcaster.<br>
<br>
A third option is to phrase your master_property clause as such:<br>
<br>
"link": {<br>
"master_property": {"reverse_property":
"/user/cotton/default_domain/broadcaster/broadcasts" }}<br>
}<br>
<br>
this is saying "give me the reverse property, where the reverse of the
link is ...broadcaster/broadcasts...<br>
<br>
I suspect that any_master is really what you want though..<br>
<br>
Alec<br>
<blockquote
cite="mid:A6F816F1BC86CC46A10618006196729602F09D5B@zsi-sbs01.ZSI.local"
type="cite">
<div class="Section1">
<p class="MsoNormal"><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size: 8pt; color: rgb(166, 166, 166);">___________________________________________<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 8pt; color: rgb(166, 166, 166);">Arthur van Hoff,
CTO Software and Services, Dell-ZING<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 8pt; color: rgb(166, 166, 166);">W: 650-267-2413,
F: 650-267-2498, M: 650-283-0842<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Developers@freebase.com">Developers@freebase.com</a>
<a class="moz-txt-link-freetext" href="http://lists.freebase.com/mailman/listinfo/developers">http://lists.freebase.com/mailman/listinfo/developers</a>
</pre>
</blockquote>
<br>
</body>
</html>