Académique Documents
Professionnel Documents
Culture Documents
Direct, 30%
Google, 30%
Yahoo, 12%
MSN\Live, 3%
Other, 25%
When you’re looking for specific information on an unfamiliar website…
100%
90%
80% 47% Search
70%
60%
50%
40% 33% Browse
30%
20% 13% Abandon
10%
0%
Forrester Research, forrester.com. “It’s time to update site search functionality”, 5/1/2006, Iris Cremers
Crawlers index HTML text and follow links
Crawlers visit your site on a regular basis and index for new
content
Determine relevancy relative to the rest of the web
Make pages for users
Produce well formed HTML for your website
Use text words for key terms as crawlers can't index images
Ensure Title and ALT tags are descriptive
Handle Title in ASP.NET Master and Content pages
Meta tags that accurately describes the page contents
Keep links functional and simple
Dynamic content
Simple URLs with small number of parameters
http://www.somesite.com/view.aspx?ItemID=22
http://www.somesite.com/movies/view.aspx
Review site in Lynx text browser to ensure crawlers have a
text rendering for high end features
JavaScript, AJAX, Flash, Silverlight
Help the Crawler index the right pages
robots.txt – specify which directories to include/exclude
Sitemap – specify page relative priority, change frequency,
last modified
SearchDataSource
Natural binding of UI elements for search input
Enables data binding of search results
Style to your website to provide consistent experience
Search Providers
Live Search (formally MSN Search)
Sample code for Index Server, Yahoo, …
Look at the QuickStarts on how to write your
own search provider
Jonathan Hawkins
Architect
ASP.NET
<asp:TextBox ID="TextBoxSearch" runat="server"></asp:TextBox>
<asp:Button ID="ButtonSearch" runat="server"
OnClick="ButtonSearch_Click“ Text="Search" />
SOAP API
http://dev.live.com/livesearch/sdk
<system.web>
<httpHandlers>
<add verb="*" path="SearchSiteMaps.axd“
type="Microsoft.Search.SearchSiteMapHandler" validate=“false"/>
</httpHandlers>
</system.web>
public class ProductSiteMapData : DynamicDataSearchSiteMapProvider
{
// Return a collection of results.
// Use LINQ, ADO.NET, your code to make a collection
public override IEnumerable DataQuery()
{
String connectionString = “…”;
var q =
from p in Products
where p.UnitsInStock > (p.ReorderLevel * 10)
select p;
return q;
}
}
<?xml version="1.0" encoding="utf-8" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>http://example.com/Northwind/SearchSiteMaps.axd?sitemap=Product</loc>
<lastmod>2007-04-03T08:24:00.169Z</lastmod>
</sitemap>
<sitemap>
<loc>http://example.com/Northwind/SearchSiteMaps.axd?sitemap=Category</loc>
<lastmod>2007-04-03T08:24:00.169Z</lastmod>
</sitemap>
<sitemap>
<loc>http://example.com/Northwind/SearchSiteMaps.axd?sitemap=Navigation</loc>
<lastmod>2007-04-03T08:24:00.169Z</lastmod>
</sitemap>
</sitemapindex>
<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://localhost:52062/Northwind/Product.aspx?ProductId=4</loc>
</url>
<url>
<loc>http://localhost:52062/Northwind/Product.aspx?ProductId=8</loc>
</url>
…
</urlset>
Symbols Keywords
+ & AND contains: inanchor: language:
site: {mtch=100}
http://search.live.com/macros
Open Search Standard: http://a9.com/-/spec/opensearch/1.1/
JavaScript: window.external.AddSearchProvider('http://www.nasa.gov/nasa-opensearch.xml');
Configuration File:
<?xml version="1.0" encoding="UTF-8" ?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>NASA Space Image Search</ShortName>
<Description>Search NASA.gov for the latest space photos.</Description>
<Url type="text/html" template="http://www.nasa.gov/search?q={searchTerms}" />
</OpenSearchDescription>