Hello, Custom Search Engines are designed to provide search results over a curated piece of Google's web index. Unfortunately, it is not compatible with other types of search (e.g. video, news, blog). The closest approximation for these other types of search would be to use a "site:"-style restrict to limit the scope of the search results. You can read more about using the setSiteRestriction parameter with the various types of search in the documentation: http://code.google.com/apis/ajaxsearch/documentation/reference.html
Note: This parameter is available for Blog and News Search, but not for Video Search. Thanks, Adam On Aug 27, 9:37 am, dizid <[email protected]> wrote: > Hi, > > I want to build a tabbed search based on a custom search engine. > The CSE restriction works fine for the websearch but not for any other > searches, like newsSearch or imageSearch > > From the playground, i have put this together, which only gives > restricted results from de websearch and general results for the news > search: > > function OnLoad() { > var searchControl = new google.search.SearchControl(); > var webSearch = new google.search.WebSearch(); > webSearch.setSiteRestriction('003126880683156422068:q-mc_xjqsos'); > > searchControl.addSearcher(webSearch); > > // site restricted news search using a custom search engine > News = new google.search.NewsSearch(); > News.setSiteRestriction("003126880683156422068:q-mc_xjqsos"); > searchControl.addSearcher(News); > > searchControl.draw(document.getElementById("content")); > > searchControl.execute('design'); > > } > > google.setOnLoadCallback(OnLoad); > > My question: how can i get all searchers (video, news, blog) to use > the CSE restriction? -- You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-ajax-search-api?hl=en.
