<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">credit goes to David Flanagan who is putting together our 2nd gen. mql and services docs which, I trust, are going to be awesome. His "JavaScript" book rests just to the left of my keyboard as I type this, thus my high expectations ;)&nbsp;<div><br></div><div>Brendan</div><div><br><div><html>On Jul 16, 2008, at 6:33 PM, Arthur van Hoff wrote:</html><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div lang="EN-US" link="blue" vlink="purple" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div class="Section1"><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10pt; font-family: 'Comic Sans MS'; color: rgb(31, 73, 125); ">Great idea.<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10pt; font-family: 'Comic Sans MS'; color: rgb(31, 73, 125); "><o:p>&nbsp;</o:p></span></div><div style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; border-left-style: solid; border-left-color: blue; border-left-width: 1.5pt; padding-top: 0in; padding-right: 0in; padding-bottom: 0in; padding-left: 4pt; "><div><div style="border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-top-style: solid; border-top-color: rgb(181, 196, 223); border-top-width: 1pt; padding-top: 3pt; padding-right: 0in; padding-bottom: 0in; padding-left: 0in; "><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><b><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">From:</span></b><span style="font-size: 10pt; font-family: Tahoma, sans-serif; "><span class="Apple-converted-space">&nbsp;</span><a href="mailto:developers-bounces@freebase.com">developers-bounces@freebase.com</a> [<a href="mailto:developers-bounces@freebase.com" style="color: blue; text-decoration: underline; ">mailto:developers-bounces@freebase.com</a>]<span class="Apple-converted-space">&nbsp;</span><b>On Behalf Of<span class="Apple-converted-space">&nbsp;</span></b>brendan<br><b>Sent:</b><span class="Apple-converted-space">&nbsp;</span>Wednesday, July 16, 2008 6:30 PM<br><b>To:</b><span class="Apple-converted-space">&nbsp;</span>For discussions about MQL\, Freebase API and apps built on Freebase<br><b>Subject:</b><span class="Apple-converted-space">&nbsp;</span>[Developers] minor change in search api behavior (empty result setwill no longer be an error)<o:p></o:p></span></div></div></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p>&nbsp;</o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">Hi all,<o:p></o:p></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p>&nbsp;</o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">This change is no likely to affect any apps/scripts out there, but here goes:<o:p></o:p></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p>&nbsp;</o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">Currently, if you make a search request and the service finds nothing, it comes back as an error. &nbsp;e.g.:<o:p></o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p>&nbsp;</o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><a href="http://freebase.com/api/service/search?prefix=insx&amp;type=/music/artist&amp;type_strict=all" style="color: blue; text-decoration: underline; ">http://freebase.com/api/service/search?prefix=insx&amp;type=/music/artist&amp;type_strict=all</a>&nbsp;<o:p></o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><br>{<br>"status": "200 OK",<br>"code": "/api/status/error",<br>"messages": [<br>&nbsp;{<br>&nbsp;&nbsp;&nbsp;"message": "No search results found",<br>&nbsp;&nbsp;&nbsp;"code": "/api/status/error/search/empty"<br>&nbsp;}<br>],<br>"result": []<br>}<o:p></o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p>&nbsp;</o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">In the coming weeks this will change. &nbsp;The expected response for an empty result will be:<o:p></o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p>&nbsp;</o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span class="apple-style-span"><span style="font-family: Arial, sans-serif; ">{&nbsp;</span></span><span style="font-family: Arial, sans-serif; "><br><span class="apple-style-span">&nbsp;&nbsp;"status": "200 OK",&nbsp;</span><br><span class="apple-style-span">&nbsp;&nbsp;"code": "/api/status/ok",&nbsp;</span><br><span class="apple-style-span">&nbsp;&nbsp;"messages": [&nbsp;</span><br><span class="apple-style-span">&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;</span><br><span class="apple-style-span">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"message": "No search results found"&nbsp;</span><br><span class="apple-style-span">&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;</span><br><span class="apple-style-span">&nbsp;&nbsp;],&nbsp;</span><br><span class="apple-style-span">&nbsp;&nbsp;"result": []&nbsp;</span><br><span class="apple-style-span">}</span></span><o:p></o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p>&nbsp;</o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Arial, sans-serif; ">This response just seems more sensible, particularly given that the service allows the user to request a very constrained result (strict=all means results must match the given type parameter value)</span><o:p></o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p>&nbsp;</o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Arial, sans-serif; ">If your code has error handling for this "no results" case, you might want to make sure this change won't break things.</span><o:p></o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p>&nbsp;</o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Arial, sans-serif; ">Let me know if you have any questions/concerns.</span><o:p></o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p>&nbsp;</o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Arial, sans-serif; ">Brendan</span><o:p></o:p></div></div></div></div></div>_______________________________________________<br>Developers mailing list<br><a href="mailto:Developers@freebase.com" style="color: blue; text-decoration: underline; ">Developers@freebase.com</a><br><a href="http://lists.freebase.com/mailman/listinfo/developers" style="color: blue; text-decoration: underline; ">http://lists.freebase.com/mailman/listinfo/developers</a><br></div></span></blockquote></div><br></div></body></html>