Searching via Domino URL commands
Table of contents
Search-related URLs are available to perform view, multiple-database, and domain searches. Typically you define a URL that displays an input form to allow users to define their own searches. This can be a customized search form or the default search form. A designer may also define a URL to perform text searches without user input. Both the input and the results forms may be customized.
The URLs in the following sections are for example only. They are not intended to point to existing Web sites unless specifically indicated.
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.
protocol://Host/Database/templateForm ?SearchDomain ArgumentList
- templateForm is an optional argument that calls the search results form.
- ArgumentList is a list of optional arguments.
The server provides a direct or redirect URL command as needed for links that are 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.
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.
Where: $SearchForm and ArgumentList are optional arguments.
Use SearchView URLs to limit a search to documents displayed in one database view. This URL is useful for views that show all documents (so that 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."
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 is 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.
The special identifier $SearchForm indicates that Domino will present a search site form for search input. If this identifier is provided, ArgumentList is ignored.
The ArgumentList must contain the Query argument. In addition, it may contain any or all of the other arguments in any order:
Where string is the search string.
Where n is the number of results to display on each page until the SearchMax has been reached. For example, Count=10 shows 10 results per page.
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.
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.
Indicate TRUE for fuzzy search. The default is FALSE.
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.
Specifying SearchOrder=4 produces unexpected results if any of the following points are true:
1. The Count=n argument is used with a value less than the number of documents found.
2. The Start=n argument is used with a value other than 1.
3. The Default Search Limit is less than the number of documents found.
4. The Max Search Limit is less than the number of documents found.
5. 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
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.
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 tenth document found in the search. Start=0 means that paged results are not returned.
To customize the Web search results page for SearchView:
1. Create a form and assign it one of the form names shown in the following table.
$$SearchTemplate for viewname
Associates the form with a specific view. Domino requires the $$ViewBody field, but ignores the value. The form name includes viewname, the alias for the view, or, when no alias exists, the name of the view. For example, the form named "$$SearchTemplate for All Documents" associates the form with the All Documents view.
Domino requires the $$ViewBody field, but ignores the value. This form is the default for all Web searches that are not associated with a specific form.
2. Add a field named $$ViewBody to the form.
3. If you want to display results page-by-page, add buttons or hotspots for forward and backward navigation to the form.
4. Use the Start and Count parameters in your URL command.
For more information about the URL commands and search templates, refer to All Domino URLs and $$SearchTemplate.
Web searches over the Domain catalog can use any form through an OpenForm URL command, building and invoking a SearchDomain URL command to perform the search on catalog.nsf database, supplying arguments either as URL command arguments or through posted field values.
Single database searches over a Domino Web application can be initiated by using a $SearchForm?SearchView URL command. In this case, Domino looks in the current database for a form with the actual name or the alias name $$Search. If the form exists, Domino opens it. Otherwise, Domino displays a default search form based on the search.h file stored in the Domino\Icons directory. The $$Search form builds and invokes a SearchView URL command to perform the search, supplying arguments either as URL command arguments or using posted field values. You can also customize the default search.h form.
You may refer to the following table to customize a search form for the Web. The table provides a detailed list of the URL command arguments that are used to execute an initial search through the SearchDomain or SearchView URL. These values are available on the results page for use by buttons and hotspots on the results form. For example, you may specify &SearchOrder=2 on your initial search form. The field SearchOrder has a value of two in the results page. A Next button on the results form can use this value for the next page or override it by specifying something else. This navigation process is detailed in Customizing the search results display.
in the Database properties. If selected, a URL attached to a hotspot or button is computed on the click event. If it is not selected, the URL is computed when the page is loaded.
Although TRUE and FALSE can be specified for some of the fields, when the values are carried over onto the results page they are 1 or 0.
Search string used
Starting document number. 0 = unpaged
Number of results requested for this page. 0 = unpaged
Actual number of results returned this page, which may be less than Count requested.
This field is useful in determining the Start parameter for a Next button.
Total number of hits found by the search.
Maximum number of entries to return in total; 0 = no limit.
(only for URL command)
Include word variants: 1 or 0.
(only for URL command)
1 = By relevance
2 = By date ascending
3 = By date descending
4 = Use view order (SearchView only)
(only for URL command)
Use thesaurus synonyms: 1 or 0.
(only for URL command)
Use fuzzy search: 1 or 0.
(only for Notes client)
FT_SCORES = By relevance
FT_DATE_ASC = By date ascending
FT_DATE_DES = By date descending
(only for Notes client)
FT_STEMS = Include word variants
FT_FUZZY = Use fuzzy search
FT_DATABASE = Search databases
FT_FILESYSTEM = Search file systems
(Domain Searches only)
Name of the result entry form used.
(only for SearchView URL command)
Text unique identifier of the view being searched.
This identifier is useful in building subsequent SearchView URL commands.
(only for SearchDomain URL command)
Scope of search:
1 = Notes databases only
2 = File system only
0 = Both
The fields in the following table are available for use with the Start and Count parameters and should be added to the results form as needed.
The actual number of hits returned. This field is useful in determining the Start parameter of Next.
The total number of hits found without regard to the number of pages.