URL commands for searching for text

Search-related URLs are available for performing view, multiple-database, and domain searches. Typically you define a URL that displays an input form -- either a customized search form or the default search form -- to let users define their own searches, but you may also define a URL that performs text searches without user input. Both input and results forms may be customized.

Note: The URLs shown are for example only. They do not point to existing Web sites.

SearchDomain

Use SearchDomain URLs for text searches across a domain. The search input form is opened with the OpenForm command by name or universal ID. For search results, the results template is specified as part of the URL. If no template is found, then the default template form, $$SearchDomainTemplate, is substituted. If $$SearchDomainTemplate is not found, an error is returned. If no results are returned, the value of the $$ViewBody field remains the same.

Syntax

http://Host/Database/[templateForm]?SearchDomain[ArgumentList]

Where:

  • templateForm is an optional argument that calls the search results form.
  • ArgumentList is a list of optional arguments.

Example

http://www.lotus-10.com/mersrch.nsf/MercuryResults?SearchDomain

Redirect

The server will provide a direct or redirect URL command as needed for links displayed on the results form if the capability has been enabled. The domain URL locates information on the server where the links are generated. The redirect command locates the correct server and redirects a link to that server by constructing the appropriate URL. The redirect command can improve performance by resolving individual links when they are selected instead of resolving all of the links returned at once.

See Domino 5 Administration Help for information about enabling redirect on a server.

SearchSite

Use SearchSite URLs for text searches in multiple databases. Because the URL requires the name of a search site database, be sure to create one before using a SearchSite URL.

Syntax

http://Host/Database/[$SearchForm]?SearchSite[ArgumentList]

Where:

$SearchForm and ArgumentList are optional arguments.

Example

http://www.lotus-10.com/mercsrch.nsf/$SearchForm?SearchSite

SearchView

Use SearchView URLs to limit a search to documents displayed in one database view.

This URL is useful for views that display all documents (so you can have a full-database search) or for views in which you can predict what users need to see, such as all documents whose status is "Completed."

Syntax

http://Host/Database/View/[$SearchForm]?SearchView[ArgumentList]

Where:

$SearchForm and ArgumentList are optional arguments. The special identifier $SearchForm indicates that Domino will present a search view form for search input. If this identifier is provided, the ArgumentList is ignored. If this identifier is absent, a default form will be generated dynamically based on the contents of the search.htm file located on the server. The default form generated by the server does not support paged results.

Example

http://www.lotus-10.com/products.nsf/By+Product+Number/$SearchForm?SearchView

Optional arguments for SearchSite, SearchView, and SearchDomain

$SearchForm

The special identifier $SearchForm indicates that Domino will present a search site form for search input. If this identifier is provided, ArgumentList is ignored.

ArgumentList

The ArgumentList must contain the Query argument; in addition, it may contain any or all of the other arguments in any order.

Query=string

Where string is the search string. For more information, see "Refining a search query using operators" in the Notes® client help.

Count=[n]

Where n is the number of results to display on each page until the SearchMax has been reached. For example Count=10 will display 10 results per page.

Scope=[1,2,3]

The scope of the search. Where 1 = Notes databases only, 2 = file system only, 0 = both. The default value is 0. This argument should only be used with the SearchDomain command.

SearchEntry=formName

Where formName is the name of the form to use for the results of a domain search. The default argument is "ResultEntry," which supports all of the predefined results fields specified in the ArgumentList. This argument is valid for SearchDomain only and should not be used for SearchSite or SearchView.

SearchFuzzy=[TRUE,FALSE]

Indicate TRUE for fuzzy search. The default is FALSE.

SearchOrder=[1,2,3,4]

Indicate 1 to "Sort by relevance," 2 to "Sort by date ascending," 3 to "Sort by date descending." The default is 1. SearchView also supports a SearchOrder value of 4 to "Keep current order," which sorts the resulting set of documents in the order in which they appear in the view.

Note: Specifying SearchOrder=4 will produce unexpected results if:

The Count=n argument is used with a value less than the number of documents found The Start=n argument is used with a value other than 1 The Default Search Limit is less than the number of documents found The Max Search Limit is less than the number of documents found

If you need to specify SearchOrder=4, observe these recommendations:

Never specify Count=n or Start=n Always specify SearchMax=0 Set the Web site's Max Search Limit to a large value

SearchMax=[n]

Where n is the maximum number of entries returned. The default value is determined by the server.

SearchWV=[TRUE, FALSE]

Where TRUE = include word variants in the search. The default value is FALSE.

Start=[n]

Where n is the number corresponding to the document that appears first in your list of results.For example, Start=10 begins your list of results with the 10th document found in the search. Start=0 means that paged results will not be returned.

Examples

http://www.lotus-10.com/mercsrch.nsf/?SearchSite&Query=product+info+requests&SearchOrder=2&SearchMax=30&SearchWV=TRUE&SearchEntry="myResultsForm"

http://www.lotus-10.com/products.nsf/By+Product+Number/?SearchView&Query=PC156&SearchOrder=3&SearchMax=1&SearchFuzzy=TRUE&SearchWV=FALSE

URL search syntax and customized results

The following parameters for SearchView and SearchSite URL commands allow you to display search results page-by-page and to provide buttons or hotspots to navigate between pages.

Start and Count parameters

Start and Count parameters allow you to display search results page-by-page and may be included as arguments in the SearchView or SearchSite URL commands or as items in the search results form. The Start parameter is the entry that appears first when your results are displayed. The Count parameter is the number of results that will display on each screen. For example, if Start=5 and Count=10, the search results would display beginning with the 5th entry and would display up to 10 entries per screen until the maximum number of entries has been displayed. These parameters work with customized forms only.

Syntax

http://Host/Database/ViewName/[$SearchForm]?SearchView[ArgumentList]

http://Host/Database/ViewUNID/[$SearchForm]?SearchView[ArgumentList]

Where: ArgumentList includes the Query argument and any or all of the other arguments including the Start and Count parameters.For example: ?SearchView&Query=String&Start=n&Count=n&SearchOrder=n&SearchWV=TRUE or FALSE&SearchFuzzy=TRUE or FALSE&SearchMax=n.

Examples

http://www.lotus-10.com/products.nsf/ProductView?SearchView&Query=bicycles&Start=21&Count=20&SearchOrder=1&SearchWV=TRUE&SearchFuzzy=FALSE&SearchMax=50

http://www.lotus-10.com/products.nsf/F6025FD7E72456F985256540005839D3?SearchView&Query=bicycles&Start=21&Count=20&SearchOrder=1&SearchWV=TRUE&SearchFuzzy=FALSE&SearchMax=50