[AzureCamp 24 Juin 2014] Moteur de recherche par Thomas Conté
1.
2.
3. Maps Speech Search Translate Synonym
Windows Phone 8
Windows 8.1
(XAML)
Windows 8.1
(JavaScript)
Web Service
= Via Web browser = Via Web service= Availability
4. Status Provision via Authentication Support Free usage Paid licensing
Maps Available Bing Maps Portal Bing Maps Key
Dedicated team*
+ Forum
50k trx/day* Dedicated team
Speech Available Azure Marketplace
Azure Market
Client ID/Secret
Bing Dev Forum 500k trx/month None
Search Available Azure Marketplace
Azure Market
Account Key
Marketplace
Forum
5k trx/month Azure Marketplace
Translate Available Azure Marketplace
Azure Market
Client ID/Secret
Dedicated Forum 2M chars/month Azure Marketplace
Synonym Available in CTP Azure Marketplace
Azure Market
Account Key
Bing Dev Forum 5k trx/month None
8. // Create a Bing container.
string rootUri = "https://api.datamarket.azure.com/Bing/Search";
var bingContainer = new Bing.BingSearchContainer(new Uri(rootUri));
// Replace this value with your account key.
var accountKey = “foo";
// Configure bingContainer to use your credentials.
bingContainer.Credentials = new NetworkCredential(accountKey, accountKey);
// Build the query.
query += " site:microsoft.com";
var bingQuery = bingContainer.Web(query, null, null, null, null, null, null, null);
var bingResults = bingQuery.Execute();
var results = new List<Models.SearchResult>();
foreach (var result in bingResults)
{
results.Add(new Models.SearchResult() { Title = result.Title, URL = result.Url });
}
return View(results);
Notas del editor
Getting Started / Walkthrough Example for each Feature/Platform:
Maps:
Win8.1 JavaScript: http://msdn.microsoft.com/en-us/library/hh852186.aspx
Win8.1 XAML: http://msdn.microsoft.com/en-us/library/dn456475.aspx
WP8: Requires use of AJAX v7 in WebBrowser control, or Bing Maps REST Services
Speech:
Win8.1 XAML & JavaScript:
Enable a Project: http://msdn.microsoft.com/en-us/library/dn467592.aspx
Adding Control: http://msdn.microsoft.com/en-us/library/dn467596.aspx
Win8.1 JavaScript: http://code.msdn.microsoft.com/Speech-Recognition-19c452b4
Win8.1 XAML: http://code.msdn.microsoft.com/Bing-Speech-Recognition-210c8978
WP8: http://code.msdn.microsoft.com/wpapps/Alarm-Clock-with-voice-7b749124
Search:
Win8.1 XAML: http://code.msdn.microsoft.com/bing/Map-Driven-Search-in-28278e3d
Translate:
Win8.1 XAML: http://msdn.microsoft.com/en-us/library/dn261765.aspx
Win8.1 JavaScript: http://msdn.microsoft.com/en-us/library/dn305840.aspx
WP8: http://blogs.msdn.com/b/translation/p/windowsphone8.aspx
The Bing Search API offers:
A RESTful Web Service, in which requests are built by constructing a URL with name-value request parameters
6 Distinct Source types of response data:
Web – General web pages relevant to the query
Image – Images and Icons
Video – Videos relating to the query
News – Articles relating to search terms
Related Search – Search expressions relevant to the supplied query (such as ‘San Francisco Travel’ in response to a query of ‘San Francisco’)
Spelling Suggestions – Suggestions with misspellings corrected, enabling users to choose alternate corrected search queries
The ability to specify one or more Source types with a given request
The ability to influence results based on lat/long and ‘Market’ inputs, in addition to query terms
The ability to filter results based on many criteria, depending on the Source Type
Request specific sizes and aspects for Images
Filter on Category and Location for News
Filter on Duration and Resolution for Videos
Filter on Filetypes for Web results