Yahoo! Developer Network Blog
« Previous | Main | Next »
March 16, 2005
Y!Q Contextual Search API Available
As of today, the contextual search technology behind Y!Q is available as a Web Service. Fundamentally, this means you can provide some text as context in addition to your explicit query.
This can be very useful in resolving ambiguous queries. For example, if you use our Web Search service to provide web search on your scuba diving web site you might provide a few words or sentences about scuba diving in addition to the user's query. If a user searches for "equipment" with this context as background, they'll find more relevant results than a plain web search for "equipment".
Y!Q also works well on content heavy sites such as news or blogs. Article titles or lead paragraphs often work well as context for focusing queries beyond the explicit keywords.
See the Contextual Web Search documentation for API details and a an example using renaissance art context to get at the right results for a "madonna" search.
As always, let us know what you think. And if you've got feature request, drop 'em on the Wiki.
Jeremy Zawodny
Yahoo! Search Web Services
Posted at March 16, 2005 1:58 PM
Comments
Neat! Now I just need to write a Java wrapper for the API which doesn't depend on JAXB and I'll be off and running.
Posted by: Anthony Eden at March 16, 2005 2:46 PM
There seems to be a problem with returning the last item in a search: The search with a start of 10
http://api.search.yahoo.com/WebSearchService/V1/contextSearch?appid=mindmanager&query=Scherotter&results=10&start=10&context=CAD returns two results.
While the same search with a start of 11 incorrectly returns no results:
http://api.search.yahoo.com/WebSearchService/V1/contextSearch?appid=mindmanager&query=Scherotter&results=10&start=11&context=CAD
Posted by: Michael S. Scherotter at March 16, 2005 4:11 PM
i signed up today and am try'n to "GET" one of the xml pages using CFMX and the cfhttp tag, but it keeps giving me a "Connection Failure" message back... any ideas?
Posted by: foO at March 16, 2005 4:38 PM
I believe that http://finance.groups.yahoo.com/group/yws-search-web/message/30 will solve your Cold Fusion question. Please note that Contextual Web Search needs a POST, though, due to the potential length of the data.
Posted by: Toby Elliott at March 16, 2005 5:20 PM
not sure if this'll work, but here's the CF code i have to "GET" the xml data:
#cfhttp.statusCode#
#cfhttp.header#
#cfhttp.errorDetail#
and this is the HTTP Header information it's returning back to me:
200 OK
HTTP/1.1 200 OK Content-Type: text/xml; charset="utf-8" Connection: close P3P: policyref="http://p3p.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE GOV" Date: Thu, 17 Mar 2005 14:47:14 GMT
Connection Failure
Posted by: foO at March 17, 2005 6:47 AM
i'll try that again:
<cfhttp url="#feed#" method="get" resolveurl="no" redirect="yes">
<cfhttpparam type="Header" name="User-Agent" value="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" />
<cfhttpparam type="Header" name="Accept-Encoding" value="deflate;q=0" />
<cfhttpparam type="Header" name="TE" value="deflate;q=0" />
<cfhttpparam type="Header" name="expires" value="#now()#" />
<cfhttpparam type="Header" name="Cache-Control" value="no-cache, no-store, must-revalidate" />
<cfhttpparam type="Header" name="charset" value="utf-8" />
</cfhttp>
<cfoutput>
#cfhttp.statusCode#<br />
#cfhttp.header#<br />
</cfoutput>
<cfif cfhttp.responseheader.status_code EQ 200>
<cfdump var="#cfhttp.FileContent#" />
<cfabort />
<cfelse>
<cfoutput>#cfhttp.errorDetail#</cfoutput>
<cfabort />
</cfif>
Posted by: foO at March 17, 2005 7:18 AM
got it working... thanks for the tip ;)
had to use the "charset" attribute on the cfhttp tag, and then it worked just fine.
Posted by: foO at March 18, 2005 5:51 PM
Subscribe
Recent Blog Articles
view all
The state of mobile browsers - PPK in London
Thu, 02 Jul 2009
GeoMaker - Turning web content into maps made easy
Wed, 01 Jul 2009
Tue, 30 Jun 2009
Hacking Up North : Winners of the Sunderland Hack Challenge
Fri, 26 Jun 2009
ConvergeSC web event comes to South Carolina
Wed, 24 Jun 2009
Recent Links
Junta42 blog: News Flash: Guardian Seeks to Grow through Products, Not Content
Fri, 03 Jul 2009
Twitter Approval Matrix - June 2009 - O'Reilly Radar
Thu, 02 Jul 2009
YUI 3.0 with Jonathan LeBlanc from the Yahoo Developer Network | Unmatched Style
Wed, 01 Jul 2009
Yahoo! Search Blog: VoCampers Converge at Yahoo! Headquarters in Sunnyvale
Thu, 25 Jun 2009
Make: Online : Dorkbot London June 23
Mon, 22 Jun 2009
Archives
2009
2008
2007
2006
2005

