BOSS allows me to use the following params to filter my results
BOSS query params
- sites="foo.com,bar.com,baz.net" - search only within a set of sites
- inurl:query - only return if the query string is in the url
- intitle:query - only return if the query string is in the title
- lang/region - localization
- view=keyterms will retrieve related words and phrases for each search result.
- view=searchmonkey_feed will retrieve structured data markup, if available, for the search result in dataRSS format.
- view=searchmonkey_rdf will retrieve structured data markup, if available, for the search result in rdf format.
- abstract=long to show a larger abstract
- type = limit results to certain types of files
So, how do I add these query params to a yql statement? It doesn't seem like they are all available and when I try I get failures.
Thanks
So the first thing to do when you're trying to work out what parameters a table takes is to "desc" it, e.g. desc search.web:
CODE
<?xml version="1.0" encoding="UTF-8"?>
<query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:count="1" yahoo:created="2009-02-18T09:29:39Z" yahoo:lang="en-US" yahoo:updated="2009-02-18T09:29:39Z" yahoo:uri="http://query.yahooapis.com/v1/yql?q=desc+search.web">
<diagnostics>
<user-time>0</user-time>
<service-time>0</service-time>
<build-version>851</build-version>
</diagnostics>
<results>
<table name="search.web">
<meta>
<author>Yahoo! Inc.</author>
<documentationURL>http://developer.yahoo.com/search/boss/boss_guide/Web_Search.html</documentationURL>
<sampleQuery>select title,abstract from search.web where query="pizza"</sampleQuery>
</meta>
<request>
<query usesRemoteLimit="true">
<key name="query" required="true" type="xs:string"/>
<key constant="true" name="appid" private="true" type="xs:string"/>
<key name="view" type="xs:string"/>
<key name="type" type="xs:string"/>
<key name="filter" type="xs:string"/>
</query>
</request>
</table>
</results>
</query>
You can see here that there are a number of optional keys that the select can take (but requires query), including "type", so:
CODE
select * from search.web where query="microformats" and view="searchmonkey_feed"
And that will set the "view" query parameter for you. It looks like there are a few missing from our current table def, but of course you can now always build your own open data table :)Jonathan