Advanced Search
Sun ONE Web Server 6.1 User's Guide

> ## Basic Search

> You can use the search query page to search for documents against a collection.

> To enter a query:

> - Select one or more collections you want to search against

> - Type in a few descriptive words

> - Click the Search button (or hit the Enter key).

> The results page contains links to documents on the server that match your search criteria.

> Most of the time, you can probably find what you want by searching for keywords against a collection. However, sometimes you may need to perform a more complicated search.

> In most cases, the Advanced Search page will be the easiest way to construct a complex query. However, you can also type complex query syntax directly into the search box.

> There are two kinds of syntax tools you can use to create complex queries by hand, you can use both Wildcard Characters and Search Query Operators in the same search.

> ## Wildcard Characters

> Wildcard characters are special characters that stand for various other characters or groups of characters in a search. For example, in a query a question mark (?) is a wildcard character representing any letter or number. The following options are available:

> - Question mark (?)

> - Asterix (*)

> - Space

> ### Question mark (?)

> Matches any single character.

> Example

> b?g - Searches for the words bag, beg, big, bog, and bug.

> ver???? - Searches for words like verdant, version, verbose, and verdict. Does not search for words like verify and verily which contain the string "ver" but not with four letters after it.

> ### Asterix (*)

> Matches any group of characters.

> Example

> do* - Searches for documents containing any word starting with the letters "do", such as dozen, doctor, doughnut, documentation, and so forth.

> ### Space

> To generate a list of all documents in the entire collection or category, simply use a single space as the query.

> ## Search Query Operators

> You can use additional search operators to create a more complex query and fine-tune your search. You can use the following operators:

> - AND, <AND>

> - <CASE>

> - <CONTAINS>

> - equals (=), <EQUALS>

> - <ENDS>

> - greater than (>), <GREATER>

> - less than (<), <LESS>

> - less than or equal to (<=), <LEQ>

> - <MATCHES>

> - <NEAR>

> - <NEAR/n>

> - NOT, <NOT>

> - not equal (!=)

> - OR, <OR>

> - <PHRASE>

> - <STARTS>

> - <STEM>

> - <WORD>

> ### AND, <AND>

> Adds mandatory criteria to the search. You do not need to include the AND operator to join keywords in your search query. Sun ONE Web Server automatically includes it between terms separated by spaces. Equivalent to inserting a space between two keywords.

> Example

> Returns documents that contain both words: Anderson and Tull, ignoring documents that contain only one of the two keywords specified.

> ### <CASE>

> Makes a case-sensitive search on the keywords specified.

> Note | The case-sensitive search is automatically performed on queries that contain uppercase letters; you don't have to type <CASE> for those terms. However, the search performed on terms that are in lower-case is, by default, a case-insensitive search.

> Example

> Finds documents with mark in lower case, but not those with Mark.

> ### <CONTAINS>

> Finds documents containing the specified words in a Document Field. <CONTAINS> works on whole words only, while <SUBSTRING> operates on any set of characters.

> Example

> Finds documents containing the words Jethro Tull in the title.

> ### equals (=), <EQUALS>

> Finds documents where a Document Field matches a specific value.

> Example

> Finds documents created on July 17, 2003.

> ### <ENDS>

> Finds documents where a Document Field ends with a specified string of characters.

> Example

> Finds documents that have titles ending in the word Brick.

> ### greater than (>), <GREATER>

> Finds documents where a Document Field is greater than a specific value.

> Finds documents created after July 17, 2003.

> ### less than (<), <LESS>

> Finds documents where a Document Field is less than a specific value.

> Finds documents created before July 17, 2003.

> ### less than or equal to (<=), <LEQ>

> Finds documents where a Document Field is less than or equal to a specific value.

> Finds documents created before July 17, 2003.

> ### <MATCHES>

> Finds documents where a Document Field matches the specifies pattern provided as a keyword.

> Example

> Finds documents with titles containing words such as virtual, Tull, tuning, and so forth, that include the pattern tu.

> ### <NEAR>

> Finds documents in which specified words are within 1000 words of each other. The closer the words appear to each other, the higher the relevance score assigned to the document.

> Example

> Finds documents containing both the words Anderson and Chrysalis, with no more than 1000 words between them and assigns greater relevance to those where the two words are closer to each other.

> ### <NEAR/n>

> Finds documents in which words are within n words of each other. The value of n must be between 1 and 1024. All documents within the specified proximity are assigned equal relevance.

> Example

> Finds documents containing the phrases "flute at Hammersmith" and "flute recitals at the Hammersmith" because there are no more than three words between flute and Hammersmith. Would not find a phrase like "flute and other musical instruments in the market near Hammersmith".

> ### NOT, <NOT>

> The NOT operator modifies other operators. Finds documents that do not contain a specific word or phrase.

> Note | Use <NOT> to modify the <OR> operator or the <AND> operator.

> Example

> Finds documents containing the name Barre but not the name Conway.

> ### not equal (!=)

> Finds documents created before or after, but not on July 17, 2003.

> ### OR, <OR>

> Adds optional criteria to the search.

> Example

> Finds documents containing either the word Aqualung or the word Stormwatch.

> ### <PHRASE>

> Links individual words together as phrases. Sun ONE Web Server treats multiple words enclosed by quotation marks as phrases. Thus, <PHRASE> locomotive and <PHRASE> breath and "locomotive breath" are identical queries.

> Finds documents containing the phrase apples and oranges.

> (Because it is part of a phrase, the word and is treated as a word to be searched for rather than an operator.)

> Ignores documents where the words locomotive, and, breath do not appear together as a phrase.

> ### <STARTS>

> Finds documents where a Document Field starts with a specified string of characters.

> Example

> Finds documents with titles starting with the word Chronology.

> ### <STEM>

> Finds documents that include variations of the specified word, such as plurals, past tenses, and so on.

> Note | Sun ONE Web Server assumes <STEM> as a default. You do not have to actually enter <STEM> in the search box

> Example

> Finds documents that contain any variant of publish, such as publisher, publishing, public, and publication.

> ### <WORD>

> Finds documents that contain the exact word specified.

> Example

> Finds documents that contain the word "Ian" without also finding documents that contain similar words such as "martian" or "diana".

> ## Document Field

> Sun ONE Web Server maintains an index of documents. The index contains an entry for each document. Each index entry contains one or more fields such as Title, Author, and URL. Queries can be limited to specific document fields, and documents are only found if they match your criteria in the specified fields.

> For example, if you simply search for Einstein, you will find all documents that have the word Einstein in any one of the Title, Author, or Keywords fields. This will include documents about Einstein, documents that make reference to Einstein, and documents written by Einstein. But if you specify Author = "Albert Einstein" , you will only find documents written by Albert Einstein.

> By default, the index fields that you can search are:

> - Author. The author, authors, or organization that created the document as specified with an <Author> Meta Tag.

> - Keywords. The keywords as specified with a <Keywords> Meta Tag.

> - Date. The date that this document was last edited or modified.

> - Title. The document's title as specified with the HTML <Title> tag.

> (Your administrator may choose to create additional fields, or remove some of the default fields.)

> Advanced Search

> Copyright 2003 Sun Microsystems, Inc. All rights reserved.