Chapter 6 Using Search The Web Publisher search function provides you with the ability to search the file information and contents of documents on a remote server. The server indexes the files so that you can use your web browser to view the documents that are found for your search. This chapter discusses these topics:
The Web Publisher search function provides you with the ability to search the file information and contents of documents on a remote server. The server indexes the files so that you can use your web browser to view the documents that are found for your search.
Preparing Data for Searching
Performing a Search: The Basics
Using the Query Operators
About Collection Attributes
META-Tagged Attributes
Table 6.1 The default attributes indexed for each file format
If this document had been indexed with its META tags extracted, you could search it for specific values in the writer, publication date, or product fields. For example, you could enter this query: Writer <contains> Smith or PubDate > 1/1/00.
making a queryyou enter your search criteria.
displaying search resultsthe server displays a list of the documents that match your criteria.
viewing a documentyou can view a specific highlighted document from the search results list.
viewing the contents of a document information collectionyou can look at the information that is maintained for each of your collections.
Creating a Search Query
Getting Search Results
Displaying Collection Contents
The Standard Search Query Form
The Advanced HTML Search Query Page
The Guided Search Applet
Type this URL in the location field in your web browser:
http://yourServer/search
Figure 6.1    The standard search query page
In the search query page that appears, choose the collection you want to search through from the drop-down list in the "Search in" field.
Enter the word or phrase for your search query in the For field. You can create complex queries by combining operators. See "Query Operators: a Reference" for details about the search operators.
Click the Search button to execute your query.
Go to the standard search query page by typing this URL in the location field in your web browser:
Disable Java for your browser. To do this, use the Advanced option preferences menu command.
Click Guided Search on the standard search form to display the advanced HTML query page. Figure 6.2    The advanced HTML search query page
Figure 6.2    The advanced HTML search query page
In the For field, type in the word or phrase you want to search for. You can create complex queries by combining operators. See "Query Operators: a Reference" for details about the search operators.
You can type in one or more attributes to sort the results by. The default is an ascending sort order, but you can indicate a descending sort order with a minus, as in -Pubdate. (See "Sorting the Results" for more information about sorting).
Depending on how many fields are listed for each document in the search results page or how many you want to see at a time, you can expand or limit the number of matching documents you want the search to return at a time. The Prev and Next buttons allow you access to additional pages of documents if there are too many to fit on a page at once.
Use the drop-down list in the Search In field to choose the collection you want to search through. You can select more than one collection by holding down the Control key as you click on another collection. All collections in a query must be in the same language.
Note. Attributes for link management and agent services are listed, but these are no longer used in Web Publisher 4.x, so they will not produce useful results.
To access guided search from the standard search query page, follow these steps:
Obtain the standard search query page by using this URL:
Click Guided Search on the standard search page to display the guided Java-based query page. Figure 6.3    The guided search query applet
Figure 6.3    The guided search query applet
Choose the collection you want to search through from the drop-down list in the Search In field.
Use the For drop-down list to select the type of element you wish to search for. In this example, choose Words.
In the blank text field, type in the word you want to search for. See "Query Operators: a Reference" for details about the search operators.
Click Add Line to add the first part of the query. The word appears in the large text display box at the bottom of the form.
To add to your query, choose another element from the drop-down list. In this example, choose Attribute.
A new drop-down list appears on the right side of the form, listing all attributes that are available for the chosen collection. Choose the attribute you want to search against.
From the drop-down list above the text input field, choose a query operator (Contains, Starts, Ends, Matches, Has a substring) or logical operator (=, <, >, <=, >=) for your query.
In the blank text field, type in the attribute value you want to search for.
Click Add Line to add another line for your query. You can click Undo Line to remove the last line you added or Clear to remove the entire query.
Click the Search button to execute the search.
Access Permission Checking
Listing Matched Documents
Sorting the Results
Displaying a Document
searching on the Web Publishing collection only, not as part of a multi-collection search
searching on any collection other than the Web Publishing collection, singly or as part of a multi-collection search
clicking on the URL for a document listed as part of the search results
clicking on the link, which may be a graphical element, that displays the document with the search query word or phrase in highlighted text.
Figure 6.4    Sample search results
Displaying a Document In the default installation of iPlanet Web Server, when you obtain a list of the documents that match your search criteria, you can select a single document to display in your web browser. The browser can display the original document or you can choose to display the document with additional formatting so that your search query word or phrase is highlighted with such text attributes as color, boldface, or blinking.
collection name, label, and description
collection format
number of attributes in the collection and a list of their names
number of documents in the collection
collection size and status
language and character set
input and output date formats
The search engine interprets the search query based on a set of syntax rules. For example, by entering the word region, the actual word region and all its stemmed variations (such as regions and regional) are found. The search results are ranked for "importance," which means how close the matched word comes to the originally input search criteria. In the example above, region would rank higher than any of the stemmed variants.
Default Assumptions
Search Rules
Determining Which Operators to Use
Query Operators: a Reference
Using Wildcards
ORSearch considers each word or phrase in the query separated by a comma to be optional, although at least one must be present. In effect, this is an implicit OR operation. For example, Monterey, otter is interpreted as searching for documents that contain either Monterey or otter. Note that angle brackets are not required for OR.
Angle Brackets
Combining Operators
Using Query Operators as Search Words
Canceling Stemming
Modifying Operators
Table 6.1 Deciding which operator to use
Table 6.2 Query language operators
Finds documents that contain plan, plane, and planet as well as any word that begins with plan, such as planned, plans, and planetopolis. See the next section for more details and examples.
Table 6.3 Wildcard operators
You must enclose the entire string in back quotes and you cannot have any embedded spaces.
Several characters have special meaning for the search engine and require you to use back quotes to be interpreted as literals. The special search characters are listed here:
comma ,
left and right parentheses ( )
double quotation mark "
backslash \
at sign @
left curly brace {
left bracket [
back quote ` (Note: You can only search on back quotes as literals if your server administrator has set this up.)
For another example, if you wanted to search on the string "c`t", which contains a back quote, you would type