This chapter describes the search syntax and search options that you use to search the docs.sun.com Web site. You can search for every document on this site regardless of the book's format. Available formats include:
XML-based books, which are displayed as a tree of chapters and sections
HTML books, which are displayed as a set of pages
PDF-only books
Here is a list of the information in this chapter:
This section describes features on the docs.sun.com Web site that enable you to restrict the scope of your search.
The docs.sun.com site provides a book title-related option that enables you to narrow your search. Before requesting a search, you can select Search Book Titles Only by clicking the check box after the Go button. If you select Search Book Titles Only, the site searches only the titles of books for the word or phrase that you type.
Within titles, subject categories, or product categories, you can limit searching to the books that belong to a particular subject or product. As you climb up and down a tree structure on the docs.sun.com site, you can use the Within pull-down menu to narrow or expand the scope of your search by selecting a subcategory from a list of collections, subjects, or products. As you browse through categories and subcategories, those categories and subcategories are added to the list of options in the Within list. You can select any of the categories or subcategories in the Within list to modify the scope of your search.
To determine the scope of your search, choose one of the following options from the Within pull-down menu:
Select the All Books option to search in all the books on the docs.sun.com Web site. This option is available for any search.
Select a subject or product category, or subcategory, to search in the subject or product tree you are browsing at the time of the search. Expand your search by selecting any of the parent categories you browsed to arrive at the current category. This option is available when viewing a subject or product category, a browsing feature, or a book.
Select the This Collection option to search only in the books in the collection that you are viewing at the time of the search. This option is available when viewing a collection or any book that is published as part of a collection.
Select the This Book option to search only the book that you are viewing at the time of the search. This option is available only when viewing XML-based or HTML-based books.
Search syntax can contain any of the following elements:
Words – To find books that contain one or more words (or terms), type the words in the Search For field. Separate each word by one or more spaces. Search requests for multiple words return a list of books that contains all of the words, anywhere they appear in the books, and in any order. You can also search by part number.
Characters that are not letters or numbers are treated in the following manner.
The pipe symbol (|), greater-than symbol (>), less-than symbol (<), minus sign (-), 'at' sign (@), forward slash (/) and backward slash (\) are treated as word separating characters. For example, a search for the phrase Sun-Fire will be treated as a search for the two words "Sun" and "Fire".
The plus sign (+), pound sign (#), dollar sign ($), percent sign (%) and ampersand (&) are treated as word start characters. For example, #include is treated as one word, whereas #define#include is treated as two words, "#define" and "#include".
Phrases – To find books that contain a phrase, enclose the phrase in quotation marks (") in the Search For field. Search requests for phrases return a list of books in which the words appear adjacent to each other in the order specified.
You can combine multiple phrases in the same search request. For example, when you search for the phrase "solaris system" CD, books that contain the complete phrase “solaris system” and the word “CD” are listed.
Wildcard operator (*) – To find books that contain variations of a word, include an asterisk (*) at the end of the word or word within a phrase for which you want to search in the Search For field.
At present, you can not use the wildcard operator at the beginning of or in the middle of words or strings.
For example, when you type CD*, books that contain the words CD, CDs, CD-ROM, CD-ROMs, and CD_ROM_FOLDER are listed.
The docs.sun.com Web site is designed to search books, not pages within books. When you search globally or use the Within pull-down menu to search globally, the site treats all books equally, whether the word or phrase for which you search appears in XML-based books, HTML documents, or PDF-only books.
When you search all books or use the Within pull-down menu to search for information in a subject, product, or collection, the number of books that contain the string for which you searched is displayed at the top of the search results page. Only 50 books are displayed on a single page. If more than 50 books contain the string, the list of books continues on the next page. The page navigation bar at the top center and bottom center of the page indicates the total number of pages available. The indicator points to the current page. You can display other pages by clicking the page number.
A large number of matches might indicate that you need to narrow your search, either by changing your search text or by using the Within pull-down menu to scope your search more narrowly.
The docs.sun.com site displays a list of books that contains the word or phrase for which you searched in order of decreasing relevance. The relevance of a book is indicated by icons:
Documents marked with the icon are the most relevant to your search criteria.
Documents marked with the icon are the least relevant to your search criteria.
The name of the collection to which the book belongs is displayed below the title of the book, after the word “from.”
If you search for more than one word at a time, books in which the words appear closest to each other are displayed higher in the list. Books in which words appear further apart, within a maximum span of 30 words, are displayed lower in the list.
Books that contain words or phrases in a chapter title, section title, or similar element in a book are given greater relevance. These books tend to move up to the top of the list in relation to books that contain the same frequency of words or phrases but only in paragraphs instead of titles.
When you display the docs.sun.com Web site in another language, the books that are written in that language appear at the top of the current list when you search the site. For example, if you display the content on the site in French, books written in French appear at the top of the current list when you search for a word or phrase.
When searching globally, the docs.sun.com site ignores books and collections that require a password to access. Once you provide a password, however, you can search locally within a book, provided that book is XML-based.
When you open and search for information in an XML-based book on the docs.sun.com Web site, the site displays the book's table of contents with icons that indicate the relevance of book elements.
Any chapter, appendix, preface, glossary, or index marked with the icon is the most relevant to your search criteria.
Any chapter, appendix, preface, glossary, or index marked with the icon is the least relevant to your search criteria.
Book elements that have no relevance are not marked with an icon.
Words for which you search are highlighted within XML-based books. In this way, you can search and browse within a book at the same time. This feature is not available within HTML-based books.
The browsing mechanism that is available on the docs.sun.com Web site is not only a browsing mechanism, but also a mechanism that you can use to search within titles, subject categories, or product categories.
For example, you can restrict the set of documents that you want to search for a word by selecting the Product Categories tab, then clicking the Software, Solaris, Solaris 8, and Solaris 8 System Administrator Collection links, and then, in the Search For window, typing the word for which you want to search within that collection. When you browse to and open a book in that collection, that word is highlighted when it appears in the text.
The following table provides examples of search syntax.
Table 2–1 Search Syntax Examples