9
#azurecamp Moteur de Recherche Thomas Conté, Microsoft Jérôme Mainaud, Ippon 24 juin 2014

[AzureCamp 24 Juin 2014] Moteur de recherche par Thomas Conté

Embed Size (px)

DESCRIPTION

[AzureCamp 24 Juin 2014] Moteur de recherche par Thomas Conté

Citation preview

Page 1: [AzureCamp 24 Juin 2014] Moteur de recherche par Thomas Conté

#azurecampMoteur de Recherche

Thomas Conté, MicrosoftJérôme Mainaud, Ippon

24 juin 2014

Page 2: [AzureCamp 24 Juin 2014] Moteur de recherche par Thomas Conté

Recherche simple: Bing Search API

Pour aller plus loin: Elasticsearch

Au programme

Page 3: [AzureCamp 24 Juin 2014] Moteur de recherche par Thomas Conté

Bing feature availability by platform

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

Page 4: [AzureCamp 24 Juin 2014] Moteur de recherche par Thomas Conté

Accessing and provisioning Bing APIs

Status Provision via Authentication Support Free usage Paid

licensing

Maps Available Bing Maps Portal Bing Maps KeyDedicated team* + Forum

50k trx/day* Dedicated team

Speech AvailableAzure Marketplace

Azure MarketClient ID/Secret

Bing Dev Forum500k trx/month

None

Search Available Azure Marketplace

Azure Market Account Key

Marketplace Forum

5k trx/monthAzure Marketplace

Translate

Available Azure Marketplace

Azure MarketClient 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

Page 5: [AzureCamp 24 Juin 2014] Moteur de recherche par Thomas Conté

Bing Search overview

Individual or composite service operations

Available via web service• REST interface• JSON/XML responses

Six source types• Web• Images• Videos• News• Related searches• Spelling suggestions

Filters for• Image size, aspect,

etc.• News category,

location• Video duration,

resolution• Web filetypes

Search inputs• Query term(s)• Location and market• More

Page 6: [AzureCamp 24 Juin 2014] Moteur de recherche par Thomas Conté

Sur le Windows Azure Data Market:

http://datamarket.azure.com/dataset/bing/search

Deux variations:

• Bing Search API

• Bing Search API – Web Results Only

Bing Search API

Page 7: [AzureCamp 24 Juin 2014] Moteur de recherche par Thomas Conté

Comment l’utiliser?

Page 8: [AzureCamp 24 Juin 2014] Moteur de recherche par Thomas Conté

// 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);

Comment l’utiliser?

Page 9: [AzureCamp 24 Juin 2014] Moteur de recherche par Thomas Conté

#azurecampElasticsearch