Welcome to MSDN Blogs Sign in | Join | Help

Hello, World: Getting Started with IE8 Visual Search

Internet Explorer 8 Visual Search "Hello, World!" sample in action

Hello,

My name is Sébastien Zimmermann. I’m the developer owner for the Visual Search Feature, which Sharon already described in detail. I also own the Accelerators Button Feature, and during IE7 worked on Setup and Phishing Filter—now “SmartScreen® Filter”.

In this post, I would like to get you started on creating your own Visual Search service/provider for Internet Explorer 8. If you own or develop websites of any kind—even if it’s a small website or an intranet site—this post is for you.

Making your website available for search from within the browser enables your customers/users to access your website whenever they need a service from it, without having them type your full web address. Additionally, you (and your brand) are always there with them, right in their browser. The more useful the service, the more likely users are to install it to have an ongoing connection with your website.

To keep things simple, I will take the “Hello, World!” approach: give you the basics so you can quickly get your service running. To keep things simple, this service won’t even be dynamic at first. Once the foundations are there, it will be easy for you to tailor the sample to your own needs, no matter what language your pages are written in.

For the sake of simplicity, I assume in this post that your website is at http://www.example.com—please replace all references of this domain with your own website domain.

Defining Your Service

Before users can install your service, you’ll first need to define it in a way the browser can understand, i.e. through the OpenSearch Description XML file.

Copy the following code and paste it into a file that you’ll put at the root of your website. We’ll name it opensearch.xml, so it will be accessible by anyone at http://www.example.com/opensearch.xml:

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
    <ShortName>example Search</ShortName>
    <Url type="text/html" template="http://www.example.com/results.aspx?q={searchTerms}" />
    <Url type="application/x-suggestions+xml" template="http://www.example.com/suggestions.xml"/>
    <Image height="16" width="16" type="image/icon">http://www.example.com/favicon.ico</Image>
</OpenSearchDescription>

There are three important pieces we define in this file:

  • A Results Page URL whose MIME type is text/html, where the user will land after a search—here, results.aspx. The “{searchTerms}” part will automatically be replaced by IE with the user’s search terms. In this sample, I assume your website has an integrated search engine. If it doesn’t, and unless it’s an intranet website, you may replace that URL with the following one instead, which will search your domain using live.com:
    http://search.live.com/results.aspx?q=site:www.example.com+{searchTerms}

  • A Suggestions Service to assist users while typing their search queries—here, suggestions.xml. If you do not want to have a suggestions service, you may omit this line—IE will handle it just fine. Also, if you already have a suggestion service available that uses JSON instead of XML, you may use its URL instead—just replace the application/x-suggestions+xml MIME type with application/x-suggestions+json.

  • An Icon—here we made a reference to a favicon.ico file in the root of your website. This is the icon that will be used as a button in the QuickPick—the row of search provider buttons at the bottom of the search dropdown, pictured above. If you don’t have an icon for now, IE will choose a non-descript default for you, just remove the whole line. But it’s better if you have one—this allows users to recognize your website and/or brand.

Note: for your OpenSearch file to work properly in IE7, it is important that the URL of type text/html appears first in your file, before the one of type application/x-suggestions+xml or application/x-suggestions+json.

Making Your Service Discoverable

Next, you’ll need to tell the browser where to find your service description—i.e. the opensearch.xml file you just created. This is easy; just add the following line somewhere in the <head /> section of any web page where you want to make your service available:

<link rel="search" type="application/opensearchdescription+xml" href="http://blogs.msdn.com/opensearch.xml" title="example Search" />

That’s it. Try loading the page: you’ll notice that the down-arrow next to the search box has lit (Internet Explorer 8 Search Box down-arrow lights up upon service detection). Click the arrow and you’ll now be able to add your very own service in IE!

In addition, you may want to programmatically enable the user to add your provider to IE. Just add a hyperlink or button on your page that calls the AddSearchProvider() method, referencing the description file:

<a href="javascript:window.external.AddSearchProvider('/opensearch.xml')">Click here to add my search engine to IE8!</a>

Note: to check if the user has already installed your provider, you’ll want to use the IsSearchProviderInstalled() method.

Finally, when your service is installed, you’ll automatically be featured on the Accelerators button (Internet Explorer 8 Accelerators Button) without any additional work. Select some text, click on the button, then on “More Accelerators.” Choose your service and it will be called with the text you just selected. Note that you may add support for Accelerator Previews directly from the OpenSearch file. This is beyond the scope of this post, but more information is available here.

Implementing Visual Search Suggestions

Now that your service is described, let’s implement suggestions.xml. Here, I’m going to use a sample that goes over most features to give you the basics.

Ok, so let’s copy the following and paste it into suggestions.xml, at the root of your website:

<?xml version="1.0"?>
<SearchSuggestion>
    <Query>test</Query> <!-- Note: This sample will only work when you type "test" in the search box! -->
    <Section>
        <Item>
            <Text>Hello, World!</Text>
            <Url>http://www.webstandards.org/files/acid2/test.html#top</Url>
            <Description>Your Visual Search service is working!</Description>
            <Image width="100" height="100" alt="Acid2 Smiley" align="top"
                   source="http://ieblog.members.winisp.net/images/acid2smiley.png" />
        </Item>
        <Separator title="This is a separator" />
        <Item>
            <Text>This is a simple text suggestion</Text>
        </Item>
        <Item>
            <Text>And another one with description</Text>
            <Description>This is the description</Description>
        </Item>
        <Item>
            <Text>This is a text suggestion with an image</Text>
            <Image width="16" height="16" alt="Acid2 Smiley" align="middle"
                   source="http://ieblog.members.winisp.net/images/acid2smiley.png" />
        </Item>
        <Item>
            <Text>This is a suggestion with a link and an image</Text>
            <Url>http://www.live.com/results.aspx?q=Hello+World</Url>
            <Image width="16" height="16" alt="Acid2 Smiley" align="middle"
                   source="http://ieblog.members.winisp.net/images/acid2smiley.png" />
        </Item>
    </Section>
</SearchSuggestion>

And voilà! If you type “test” in your search box after selecting your service, you’ll see the cool suggestions featured at the beginning of this post. Note that anything else but “test” won’t work, because IE checks if the <Query /> tag matches what’s in the search box.

Internet Explorer 8 Visual Search ASP.NET Sample in action

If you are using ASP.NET, try this for something a little more dynamic (pictured on the left): rename suggestions.xml to suggestions.aspx, change the URL of type application/x-suggestions+xml in the OpenSearch Description file to http://www.example.com/suggestions.aspx?q={searchTerms}, and re-install your service in the browser (remove it first through Tools->Manage Add-Ons). Then, replace the first couple lines of suggestions.aspx with the following and try searching with your service again:

<%@ Page ContentType="text/xml" Language="C#" %>
<%@ OutputCache Location="None" %><?xml version="1.0"?>
<SearchSuggestion>
    <Query><%=HttpUtility.HtmlEncode(Request["q"])%></Query>
    <Section title="example Search">
        <Item>
            <Text>You typed: <%=HttpUtility.HtmlEncode(Request["q"])%></Text>
        </Item>
        <Separator />

        <!-- The rest of the file comes here -->
        <Item>
            <Text>Hello, World!</Text>
            <Url>http://www.webstandards.org/files/acid2/test.html#top</Url>
            <Description>Your Visual Search service is working!</Description>
            <Image width="100" height="100" alt="Acid2 Smiley" align="top"
                   source="http://ieblog.members.winisp.net/images/acid2smiley.png" />
        </Item>
        ...

Conclusion

The first step being the hardest, I hope this post succeeded in making it easier for you to get started. I look forward to see how you will creatively use the features in IE8 Visual Search to help your users quickly get to things they want on your site. If you need to dig deeper after reading this post, our writers created an excellent “Search Provider Extensibility” article on MSDN.

Now, it is up to you to develop amazing services using this feature. Inspire yourself from the services already available on the IE8 Gallery, and explore the possibilities.

The QuickPick menu makes “vertical” searches—such as Wikipedia, Amazon, and most likely your website—more visible and accessible, and enables users to quickly target their search on your service. So whether your website is about stock quotes and financial news, or sells music, auto parts, or cake… you can provide a way for your customers to have a deep, useful, ongoing relationship with your website.

I sincerely hope you will have as much fun developing for this feature as we’ve all had designing it. We are interested in learning about the services you create. Let us know about them, and do upload your OpenSearch Description File to the IE8 Gallery once finished for everyone to use.

Happy coding!

Sébastien Zimmermann
Software Design Engineer

edit: updated first image

Published Thursday, September 18, 2008 4:10 PM by ieblog

Comments

# Hello, World: Getting Started with IE8 Visual Search : EasyCoded

# re: Hello, World: Getting Started with IE8 Visual Search

Thursday, September 18, 2008 8:30 PM by mike

how about the ability to save the actual image resolution of the thumbnail using accelerators it's much faster that way. Is this possible to do?

# re: Hello, World: Getting Started with IE8 Visual Search

Thursday, September 18, 2008 11:03 PM by mike

how about the ability to save the actual image dimension or size of thumbnail image using accelerators for example if user mouse over a thumbnail image which is not the actual size of the image the accelerators would allow me to save image with the right dimension.

# re: Hello, World: Getting Started with IE8 Visual Search

Friday, September 19, 2008 1:20 AM by Mike Vallad

Will this 64 bit really work on my system?  Will it inhance the 3D graphics?

I cannot wait to see them.

Sincerely,

Mike Vallad

# re: Hello, World: Getting Started with IE8 Visual Search

Friday, September 19, 2008 2:37 AM by Joshua

Thanks! I'll have to give this a try for my site =)

Unfortunetly however visual search doesn't seem to be working for me? I tried ie8 and it didn't work... soon after I reinstalled Vista for some other reason and later downloaded the beta again, and it still didn't work.

I have no idea why :(

Its not just the visual search, its all the instant search results... i just get "no results" popping up.

# re: Hello, World: Getting Started with IE8 Visual Search

Friday, September 19, 2008 3:02 AM by Тендеры

Если было ло бы так нужно можно было бы объявить тендер на перевод этого текста

но видимо тендер не кто не обьявить и текст останется не переведен

# re: Hello, World: Getting Started with IE8 Visual Search

Friday, September 19, 2008 3:08 AM by Fowl

What's with the half a mega uncompressed bitmap in this post?

Even paint can do png's!

# re: Hello, World: Getting Started with IE8 Visual Search

Friday, September 19, 2008 4:08 AM by Joe

What's to stop every site I visit calling the AddServiceProvider function without me clicking a link that I want to add their service? Wouldn't I end up with loads and loads of these things adding up in my accelerator?

# re: Hello, World: Getting Started with IE8 Visual Search

Friday, September 19, 2008 9:28 AM by fearphage

This is neat and all, but i'm still waiting for the blog posts about increased standards support. Things like SVG, <audio>, <video>, XHR2 (instead of XDR), addEventListener. Closing the gap between:

 if (/* check for standard objects */) {

   /* do it the right way */

 }

 else { /* ie way */ }

is always appreciated.

# re: Hello, World: Getting Started with IE8 Visual Search

Friday, September 19, 2008 9:43 AM by hAl

@Joshua

[quote]Unfortunetly however visual search doesn't seem to be working for me?[/quote]

Try setting your first language to [en-US] in tools=>options=>general tab=>languages and remove en readd your search providers (you might have to temporary switch defaults in order to remove them)

# Cookies

Friday, September 19, 2008 10:11 AM by George Jones

Will it be possible to send back different results to different users based on a session cookie?  The instance I am thinking of is an intranet app that requires login.

# re: Hello, World: Getting Started with IE8 Visual Search

Friday, September 19, 2008 11:12 AM by EricLaw [MSFT]

@Joe: AddSearchProvider must be called after a user-initiated action (like a mouse click) and you are prompted for permission before install.

@George Jones: You will get better results if you use HTTP authentication (specifically NTLM or Kerberos) instead of a session cookie.

@Fowl: Sorry about the bitmap; we'll take a look.

# re: Hello, World: Getting Started with IE8 Visual Search

Friday, September 19, 2008 11:14 AM by EricLaw [MSFT]

@Mike Vallad: No, using a 64bit browser will not improve the graphics in any way.  The primary downside to 64-bit IE is that most ActiveX controls and browser addons are only compiled to run in 32bit IE.

# re: Hello, World: Getting Started with IE8 Visual Search

Friday, September 19, 2008 1:57 PM by Heath Stewart

Why is <Query/> sibling to <Section/>? There are reasons that a single static XML might be used for several common query strings related to a page, so putting <Section/> under <Query/> would allow a single XML file to support different query terms.

# re: Hello, World: Getting Started with IE8 Visual Search

Friday, September 19, 2008 1:59 PM by Brez

Make scroll wheels functional in smart address bar.

# re: Hello, World: Getting Started with IE8 Visual Search

Friday, September 19, 2008 3:48 PM by Sebastien Zimmermann [MSFT]

@Mike: No, Accelerators do not allow you to do this--accelerators help you send selected text to third-party providers. For what you are trying to do, which is local to your machine, you have to right click, then "Save image as", and the image has to already be a full-scale image.

@Joshua: As hAl said, the language change might work--this is when some services haven't yet implemented responses other than for the English language.

@Fowl: Thanks for letting us know--this was mistakenly saved as a bitmap with a PNG extension instead. This is now fixed, sorry.

@George Jones: As EricLaw mentioned, you might want to use HTTP authentication. However, session cookies (and cookies in general) should work, yes--just like they do when you browse.

@Heath Stewart: Thanks for the feedback, we'll look into it.

@Brez: Thanks for catching this. This seems to work after you expand a second section in the smart address bar, provided the first one displayed the scrollbars. I filed a bug internally.

# re: Hello, World: Getting Started with IE8 Visual Search

Friday, September 19, 2008 8:14 PM by FTPS User

Hello:

I know this is the wrong place to ask, but will IE8 have an FTPS (FTP over SSL) client built into it?  IIS7 supports FTPS.

 Thank You!

# re: Hello, World: Getting Started with IE8 Visual Search

Saturday, September 20, 2008 2:57 PM by Ted

@FTPS user-- no, there's no FTPS client.  If there was, they would have put it in beta-2.  It's clear that FTP/FTPS isn't an important scenario for the IE team.  There are better FTP clients that can be freely downloaded.

@John: Go elsewhere, troll.

# re: Hello, World: Getting Started with IE8 Visual Search

Sunday, September 21, 2008 12:56 AM by BU

Next feature would be a smart favorite center that automatically organize the same website address in groups. Today i just organize my favorite website and put all the same website together(not in new folders but next to each others)now when i browse my favorite center all i see is website with same favicons together its so clean to look at.

# re: Hello, World: Getting Started with IE8 Visual Search

Sunday, September 21, 2008 1:06 AM by BU

In IE 8 beta 2 do we still need to restart the whole browser when deleting browser history

to refresh and completely delete everything. If not then next features would be deleting browsing history without having to close the whole browser is nice one as well.

# re: Hello, World: Getting Started with IE8 Visual Search

Sunday, September 21, 2008 1:26 AM by Brez

Windows explorer/IE 8 beta 2 smart address bar scroll bar  have animation effect when hovering over it but the scroll bar on the main IE 8 beta window has no animation at all. Can this small thing be fix? IE 7 has this too. I notice FF3 does have the animation scrollbar working.

# re: Hello, World: Getting Started with IE8 Visual Search

Sunday, September 21, 2008 12:31 PM by Chris

When I tried this example, it worked, but the images don't show up, instead I am given the box with a red cross in it.

I've tried the URL of the face, and it works fine, so any known reason why it won't work in the search window?

# Tab Browsing and Other Features

Sunday, September 21, 2008 4:57 PM by Victoria

This following applied to IE7, where is it in IE8?

 "I want to close Internet Explorer but I have a lot of tabs open. Is there anything I can do to make them re-open the next time I start Internet Explorer?

Yes. When you close Internet Explorer, you will be asked whether you want to close all tabs. When the prompt appears, click Show Options, select Open these the next time I use Internet Explorer, and then click Close Tabs. When you reopen Internet Explorer the tabs will be restored."

# re: Hello, World: Getting Started with IE8 Visual Search

Sunday, September 21, 2008 9:09 PM by EricLaw [MSFT]

@Victoria: On the new tabs page (URL "about:tabs") click the "Reopen last browsing session" link.

# re: Hello, World: Getting Started with IE8 Visual Search

Monday, September 22, 2008 1:48 AM by Brez

Is it possible to highlight a sentence/word click the accelarator button to paste the sentence/word directly to any input box. Let say I'm typing a comment in IEblog input box and found a word in the current tab or the other tabs that i want to put in the input box.

I like the Search in Smart address bar feature but I just hate typing "? xbox 360" in the smart address bar. Why? because i have to press Shift + ? in keyboard. I rather press button . or , or / those keyboard button requires only one push button. Well it make sense to add ? but i rather have one push button.

# Internet Explorer Gallery

Monday, September 22, 2008 8:09 AM by ajo

What about a Internet Explorer Gallery for other languages? I would like one for The Netherlands.

# re: Hello, World: Getting Started with IE8 Visual Search

Monday, September 22, 2008 9:53 AM by Mitch 74

This is not the first time I have to re-post... Am I being moderated, or is there something wrong in the comments system?

There is a bug in the developer tools, debugger window: when you check the 'show all properties' checkbox and then change the object being inspected, the checkbox stays checked but not all properties are visible; you need to manually uncheck the box and check it again to have it take effect.

Will the bug affecting pseudoframes (rolling back to top on any keyboard or mouse event) be corrected?

Is there a better way to dynamically change the selected option in a SELECT node than to rewrite it completely with innerHTML on SELECT's parent, since .selected on OPTIONs and .selectedIndex are read-only properties (or just don't exist) in IE?

# re: Hello, World: Getting Started with IE8 Visual Search

Monday, September 22, 2008 12:34 PM by gerhard schelsky

liebe leute wenn ich doch nur englisch lesen köönte mit meinen 72 jahren bitte nur mitteilungen in deutsch oder bitte keine mitteilungen mehr danke

# re: Hello, World: Getting Started with IE8 Visual Search

Monday, September 22, 2008 12:35 PM by gerhard schelsky

liebe leute wenn ich doch nur englisch lesen köönte mit meinen 72 jahren bitte nur mitteilungen in deutsch oder bitte keine mitteilungen mehr danke

# Implementar Opensearch en tu Página Web

Monday, September 22, 2008 7:18 PM by El blog del Pulga

Basicamente, el proyecto Opensearch es de proveer de una manera simple y sencilla busquedas en los sitios web, de manera que lo puedan acceder desde el mismo sitio web. Quizas esta descripcion te confunda, pero lo que hace Opensearch es de proveer de

# re: Hello, World: Getting Started with IE8 Visual Search

Monday, September 22, 2008 7:18 PM by Sebastien Zimmermann [MSFT]

@Chris: You might have to kill all instances of iexplore.exe. This is a known bug.

@Brez (1): Which animations are you talking about? I see them working identically between the search box and the smart address bar in IE8 Beta 2.

@Brez (2): No, this is not possible. Copy/Pasting is available from the right-click contextual menu. We wanted to keep the Accelerators button focused on its purpose.

# re: Hello, World: Getting Started with IE8 Visual Search

Monday, September 22, 2008 7:36 PM by John Hrvatin [MSFT]

@Mitch 74

Thanks for the bug report on the tools!  We have this in our beta bug database.

Thanks!

# re: Hello, World: Getting Started with IE8 Visual Search

Wednesday, September 24, 2008 10:47 AM by Kasya

Bug: When i click to Favourites Button it doesn't work. Tells me Don't Send or Send Error Report. When i click Don't Send it opens second time and then closes.

Suggestion: What you think about making thumbnails of Web Pages when you mouse over it (Like in Windows Vista Aero Glass Style Taskbar Thumbnails)?

# re: Hello, World: Getting Started with IE8 Visual Search

Wednesday, September 24, 2008 3:28 PM by john

How do we test this?  I'm trying to use paths without the domain name so that the file will work on development, staging and production machines.  Am I really going to be required to include a domain name in the URLs?  Why can't it just assume the domain name in use?

<?xml version="1.0" encoding="UTF-8"?>

<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">

 <ShortName>GF Search</ShortName>

 <Url type="text/html" template="/content/search.aspx?searchtext={searchTerms}" />

 <Url type="application/x-suggestions+xml" template="/Content/OpenSearchSuggestions.xml"/>

 <Image height="16" width="16" type="image/icon">http://www.grahamfield.com/favicon.ico</Image>

</OpenSearchDescription>

# re: Hello, World: Getting Started with IE8 Visual Search

Wednesday, September 24, 2008 3:28 PM by EricLaw [MSFT]

@Kasya: Crashes when you click on the Favorites button are almost exclusively due to a particular buggy add-on.  

Please see www.enhanceie.com/ie/troubleshoot.asp#crash for information on running without addons.  In your Manage Addons list, do you have a "DriveLetterAccess" add-on listed?

# re: Hello, World: Getting Started with IE8 Visual Search

Wednesday, September 24, 2008 3:29 PM by john

Also, how are you going to prevent unscrupulous vendors from naming their search names "Google" or "Live"?  

# re: Hello, World: Getting Started with IE8 Visual Search

Wednesday, September 24, 2008 5:38 PM by john

Ok.  I just implemented this.  For reference, you need to htmlencode the URL.  Otherwise, ampersands in a URL will break the XML.  Also, I had to give a width and a height on the Image element, or it wouldn't show.

Question: Is there a way for there to be a wait time before the search page is queried?  Right now, it seems like the search attempt is instantaneous when a key is entered.  So, if someone typed "balloon" really fast, 7 searches are made.  This could potentially be a lot of concurrent hits on the server.  There needs to be something like a 100-300ms pause after the last keystroke is made before a search is attempted.  Also, are you caching any results?

Thanks,

John

# re: Hello, World: Getting Started with IE8 Visual Search

Wednesday, September 24, 2008 7:17 PM by EricLaw [MSFT]

@John: Results are cached depending on the HTTP response headers from the server.  To learn more about setting proper HTTP response headers, please see http://www.fiddler2.com/redir/?id=httpperf

@john: The user is shown information about the origins of a search engine when they're given the opportunity to install it.  As noted in the dialog box: "Search provider names can be misleading.  Only add search providers from websites you trust."  Of course, trademark law does apply in this case as well.

# re: Hello, World: Getting Started with IE8 Visual Search

Thursday, September 25, 2008 12:26 AM by john

Cool.  You might have missed the question about the opensearch.xml file.  Is there a way to use /content/abc instead of http://server.com/content/abc in the opensearch.xml file?  This way the file could stay the same regardless of whether it was development, staging or production?

# re: Hello, World: Getting Started with IE8 Visual Search

Thursday, September 25, 2008 3:35 PM by EricLaw [MSFT]

@john: Sorry, no, the OpenSearch spec doesn't support relative paths, and neither does IE.  You can easily write a PHP, ASP, CGI, etc which dynamically generates the XML file based on the current hostname.

# re: Hello, World: Getting Started with IE8 Visual Search

Thursday, September 25, 2008 5:39 PM by james3mg

I've been trying to implement this, mostly successfully, and I've got two questions:

(note I'm using the XML suggestions file method, rather than JSON)

1) If I want to use the common example of providing suggestions for an "xbox" query, how would I have it show the results when only "xb" was entered (that is, show the suggestions when only part of the query had been typed)?  Do I have to set up a suggestion for "x", "xb", "xbo" as well as "xbox"?

2) I seem to be getting errors when I try to provide suggestions for multiple possible queries.  For instance, if I wanted to provide suggestions when the user typed "xbox", and provide different suggestions when the user typed "microsoft", what is the structure for providing multiple query suggestions?

Is it:

<SearchSuggestion>

 <Query>xbox</Query>

 <Section>

   ...

 </Section>

 <Query>Microsoft</Query>

 <Section>

   ...

 </Section>

</SearchSuggestion>

Or:

<SearchSuggestion>

 <Query>xbox</Query>

 <Section>

   ...

 </Section>

</SearchSuggestion>

<SearchSuggestion>

 <Query>Microsoft</Query>

 <Section>

   ...

 </Section>

</SearchSuggestion>

Both tell me "An error has occured" in the suggestions box when I type the second query...I can't seem to find clear (in my mind) documentation on this, nor can I find any examples that show more than one query!  Could you shed some light on this for me?

Thanks so much for this article!

# re: Hello, World: Getting Started with IE8 Visual Search

Thursday, September 25, 2008 8:45 PM by EricLaw

@james3mg-- The search suggestion format is documented here: http://msdn.microsoft.com/en-us/library/cc848863(VS.85).aspx

You should only have one SearchSuggestion node as the root of your document.  If you want to match the text as the user types, you would typically use a PHP/ASP/ASPNET page on the server that accepts the {searchTerms} parameter from the url and dynamically generates a QUERY tag with the matching term.

# Caching/performance

Friday, September 26, 2008 10:39 AM by john

I want to go back to caching/performance for a minute.  I understand that Visual Search will honor caching.  However, the first time someone types in "Bariatric", there will be 9 calls to the search page, since the browser doesn't have cache info for any of the character combinations yet.  Sure, after that it will be pulled from cache, but 9 calls without a keystroke pause parameter is too much.  The person wasn't trying to get search results for B, BA, BAR, etc., and IE should wait a predetermined time to see if the user is truly done typing and ready to see results.

Does that make sense?

# re: Hello, World: Getting Started with IE8 Visual Search

Friday, September 26, 2008 11:23 AM by james3mg

I'm really not trying to be dense, but that's the document I've been trying to follow.  You'll notice that they only show ONE query: xbox

Furthermore, SearchSuggestion, Query and Section ALL say they should appear only once in the document.  So I still don't know what the xml file would look like if I wanted to provide different results for xbox AND microsoft (ignoring my previous question about results for and incompletely-typed query).  I've tried everything I can think of, and I keep getting the result "an error has occured".

Sorry I keep jumping in, John.

# re: Hello, World: Getting Started with IE8 Visual Search

Friday, September 26, 2008 2:16 PM by john

James,

I might be redundant, but you can't do anything other than a single query, and the query value in

SearchSuggestion>

<Query>xbox</Query>

<Section>

has to match what's in the search box directly.  If you want to do separate queries in a situation like this:

SearchSuggestion>

<Query>microsoft xbox</Query>

<Section>

where you return separate results for each word, then you can use the <Separator> element, as shown in this example:

<Separator title="Microsoft" />

   <Item>...</Item>

   <Item>...</Item>

<Separator title="Xbox" />

   <Item>...</Item>

   <Item>...</Item>

At least then it will be in separate sections in the dropdown.  Of course, your xml/json results generation code will have to do two queries, one for Microsoft and one for xbox, before merging the results into the single resulting xml/json response.

Does this help?  If not, hopefully the MS people will give the right answer :).

# re: Hello, World: Getting Started with IE8 Visual Search

Monday, September 29, 2008 6:46 PM by james3mg

Thanks for the help.  So, if I understand you corrently, it's NOT POSSIBLE to provide search suggestions like so:

http://i277.photobucket.com/albums/kk44/james3mg/ie8Search.jpg

with a static XML file?  The server HAS to create the file at search-time dynamically?  I just have a small site with very few common terms I wanted to provide 'single-click' links to, with a hand-created, static XML file.

So I guess I'll be off learning some new skills and quit bugging you all.  Thanks for your patience. =)

# re: Hello, World: Getting Started with IE8 Visual Search

Monday, September 29, 2008 11:04 PM by John

@james3mg,

No, it's not possible.  The browser does no filtering of the results whatsoever, since it expects you to have done the processing yourself based on the passed querystring.  So if you return xml that has search results for microsoft and xbox, the browser will display them as-is.

# re: Hello, World: Getting Started with IE8 Visual Search

Tuesday, September 30, 2008 4:34 PM by james3mg

Thanks for the final answer :)  I'd assumed when I read this article that you'd be able to have a static xml file with MULTIPLE <query> nodes, and the browser would request the sub-nodes of the query that exactly matched what was typed, and just display those.  That way, there's no overhead of the browser actually trying to filter it.  Of course, the potential for quite large XML files is probably why they didn't go that way.

But, it doesn't work that way.  I'll learn to work quite happily within the system the way it does work, I'm sure =)

# Valid namespaces and specifications

Thursday, October 02, 2008 5:21 AM by Jakob

Hi Sébastien!

Can you <em>please</em> make sure to define and use right  XML namespaces instead of just adding new XML elements or using an ad-hoc XML syntax without namespace? The this message at the OpenSearch mailing list: http://groups.google.com/group/opensearch/browse_thread/thread/a9a8e20ed670619

Thanks and greetings,

Jakob

# Building a Visual Search Service for IE8 with WCF - Part I

Saturday, October 25, 2008 4:54 PM by Come Get Some...Thoughts On Software Technology

Beta 2 of Internet Explorer has been out for a while now and as you already know one of the new functionalities

# Customising IE8 to Drive Users to Your Website

Thursday, November 13, 2008 7:42 PM by Nigel Parker's Outside Line

I have been running IE8 as my default browser since Beta 2 was released a few months ago and I have been

# Hello, World: Internet Explorer 8 이미지 검색 입문

Friday, February 27, 2009 2:10 AM by IE8 팀 블로그

이 글은 Internet Explorer 개발 팀 블로그 (영어)의 번역 문서입니다. 이 글에 포함된 정보는 Internet Explorer 개발 팀 블로그 (영어)가 생성된 시점의

# Extending Your Brand to the Desktop with Windows 7

Tuesday, March 24, 2009 10:23 PM by Tim Sneath

What is Windows 7 doing at a web conference like MIX09 ? Last week I went along to the above titled session,

# [IE8]開發自己站台的視覺化搜尋(Visual Search)

Thursday, April 02, 2009 9:55 AM by topcat

緣起承繼上篇【[IE8]搜尋功能介紹】,IE8新增了視覺式搜尋的功能。當小喵看到這個功能之後,身為WebAppDeveloper的小喵不禁開始想,如果小喵的系統,也能夠提供這樣的功能給使用者,該...

New Comments to this post are disabled
 
Page view tracker