Understanding the Basics of Searching


Searching is searching is searching. It doesn't matter whether you're referring to the process of finding your keys in the morning or finding your favorite library book in an online catalog, the process usually works the same (assuming you have had your coffee in the morning).

Every logical search that we perform relies on a set of reference points. These reference points enable you to filter out unnecessary data and focus on the data that is pertinent to your search. For instance, when you begin your search for your car keys in the morning, is India in the search criteria? Probably not, unless you live in India. I know the example might seem a little silly, but it demonstrates that there are lots of possible options (no matter how improbable) that we automatically filter out when performing simple searches.

So suppose I were searching for my keys. I have pretty much filtered out India and all countries outside of the U.S. In addition, I filter out all states except Kansas, and all cities except Olathe. I'm pretty sure I had them when I came home (because I drove), so I filter out all other houses in Olathe.

Next, I can start filtering out rooms within the house. I could search every nook and cranny within each room, but by understanding some criteria about the keys and my habits, I can further limit the number of places I have to look. For instance, if I think back to yesterday, I know I had them when I walked in the door, and I tend to put them on the kitchen table, on the dresser, or leave them in my work pants. So after a check of these usual places, the majority of the time I end up with my keys.

Although I'm sure it's absolutely fascinating for you to review the whereabouts of my car keys, the exercise has a point. It demonstrates how important filters are in finding data. Each of the filters I applied to the search for my keys significantly narrowed the number of places I had left to look.

The same concept applies to search applications within websites. Think of the search criteria that your visitors type into form fields as filters on all the data stored in your web pages. For instance, if a visitor to the Retro's Cycles site typed "Honda" into the search field, it's likely that he or she is not interested in seeing any information other than that relating to Honda motorcycles, and the results that you provide should be tailored to those needs.

Major search engines take this concept one step further by expanding their searchable data through the proactive searching of other websitesa process commonly referred to as spidering. For instance, Google (see Figure 20.1) has a search program called GoogleBot that visits thousands of websites each day and reads the content on the site.

Figure 20.1. The simple, yet effective Google search interface.


If GoogleBot determines the information to be new and useful, it copies portions of the site content into its database (or index) and adds additional information (called metadata) such as the time the site was last indexed, keywords that might be useful in retrieving the data, and title of the page where the data is located. Then, when you visit Google and type search criteria into the form, Google searches the index and returns only those results that apply to your search term.

Adding search capabilities to your site, however, doesn't necessarily require complex tools such as a spider or a metadata index. You can also accomplish a very similar result by allowing your visitors to run SQL queries against your database without them ever having to understand what a SQL query is.



Special Edition Using Macromedia Studio 8
Special Edition Using Macromedia Studio 8
ISBN: 0789733854
EAN: 2147483647
Year: 2003
Pages: 337

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net