How a Search Works
A basic "site search" functions like this: you provide a field (a box) for visitors to enter their search term or keyword(s). A visitor types in a word or two and clicks the search form's Submit button. Then the Web server sends search results back to the visitor's browser. Results appear as a list of files (mostly Web pages, but results might also include PDFs or other types of files) in your site containing the term she entered. Each item in the list is a hyperlink that the visitor can click to open that page.
If you want to use FrontPage's Web Search tool, your live Web server needs to be running FrontPage Server Extensions (Things to know before you publish). If your server's loaded with SharePoint Services, you'll use FrontPage's full text search component instead. (See step 1 in the instructions that follow.) Full text search is Microsoft's "new and improved" version of the Web search, designed to deliver more accurate results.
Creating a Search Component
To add a search box to your site:
-
Create a search box.
Insert a site search box in one of two ways:
-
If you want to add a search box to a page that already exists, place your cursor where you'd like to put the search box. Select Insert » Web Component. Within the Insert Web Component dialog box that appears, select Web Search from the list on the left. In the pane on the right, select Current Web and click Finish.
If you have SharePoint on your server, select Full Text Search instead of Current Web.
-
If you want to dedicate an entire page to your Web site search form, select File » New and, in the New task pane, click "More page templates." Double-click the Search Page template. FrontPage creates the search page.
-
-
Set Search Form Properties (Figure 16-1).
In this step, you can configure the search buttons and text box and tell FrontPage how to format search results. If you used the Insert Web Component dialog box to create your search form, the Search Form Properties box displays. On the other hand, if you used the template, right-click inside the search form and select Search Form Properties (or, just double-click inside the form).
Figure 16-1. The first tab in the Search Form Properties dialog box lets you set the form's appearance. Edit the label here for your search field and form buttons. You can also adjust the length of the search field by entering the number of characters that will be visible. As with any other form, entering a number in the "Width in characters" box doesn't change the characters a visitor can enter, just those that will display in the box.
-
Configure search form results.
Click the Search Results tab. Here, you'll set what results the search should return and how they'll display. You have control over the following settings:
-
Word list to search. If you want visitors to search your entire site, leave this box set to All. If you want them to search only a subsite or subfolder, type the name of the folder here.
FrontPage automatically excludes any folder name preceded by an underscore (like _private) from a search.
-
Date & Time format. Search results automatically display the last edited date of files returned. Select the format you prefer from the date and time format lists. If you don't want any date or time to display, select None in each list.
-
Display score. If you turn on this checkbox, FrontPage assigns and displays a search relevance score next to each page a search returns. The score shows the relevance of the file to the search criteria.
-
Display File Date. If you don't want "last edited" dates listed next to each file the search finds, turn off this checkbox.
-
Display File Size. If you want to let visitors know the size of each page their search returns, turn on this checkbox.
-
-
Click OK and save the page containing your search form.
-
Publish (Publish Your Site) and test the form.