Part II: How Did Google Become a Verb?



Visual Basic Today by Paul Kimmel – March 2, 2004

Introduction

In the 1990s, somewhere in a basement in Berkeley, California, some industrious person with a lot of storage capacity came up with the idea to store snapshots of the World-Wide Web. This site is now owned by Amazon.com and is called Alexa.com. Alexa will permit you to retrieve probably any Web site as far back as 1996. (If they have my original Web site, Alexa probably has yours.) This capability is called the Wayback machine (and now seems to be part of a free toolbar download).

It is the massive amounts of interesting, peculiar, sometimes useful, occasionally trashy data that makes the Internet so compelling. It is the ability to find information that makes the Internet so useful.

The second half of our article completes the answer to the rhetorical question: “How Did Google Become a Verb?” In this half, I will overlap a bit by showing you how to ensure that you have query access to the Index Server we configured in the first half of this article, and then we will turn all of that goodness into a reusable class, a couple of UserControls, and a Web page that can be used on any Web site. By the time you are finished, users should be able to find anything on your site you’d like them to have access to.

Testing Search Support with VS.NET’s Dynamic Query Tools

Recapping, in Part I we installed Microsoft’s Indexing service and ran a stored procedure to associate the MS Indexing service with SQL Server. The result is that we can use ADO.NET and SQL to send queries to the Indexing service.

If you want to follow along, complete these steps to test your installation and configuration of SQL Server and the Indexing service:

  1. Open Visual Studio .NET.
  2. Open the Server Explorer.
  3. Find the node that contains the name of your computer server that is running SQL Server. (This is the same server that you ran the stored procedure in, in Part I.)
  4. Open any table in any database on that server. This step will show the Query toolbar and give us easy access to the SQL pane.
  5. Enter a query similar to the following and press the Run toolbar button. (This button is the Query|Run shortcut represented by an exclamation symbol on the toolbar.)
SELECT * FROM OPENQUERY(FileSystem, 'SELECT FileName,
                        Characterization FROM SCOPE()
         WHERE FREETEXT(''footer'') > 0')

The key to success is to substitute some text that might yield results where I used the word footer. If you are successful, your VS.NET desktop should look something like mine (shown in Figure 1). Results will be based on what the Indexing service returns and any other docked windows you may have open.

Figure 1: The Server explorer left, SQL Pane top right, and the Results pane shown bottom right.

If you get some returned data, everything is ready and the rest of our work can be done with ASP.NET and Visual Basic .NET. (Keep in mind that if you want a lot of good material on ASP.NET programming, pick up a copy of Stephen Walther’s book Sams ASP.NET Unleashed.)

More by Author

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Must Read