Previous Page: Exploring Response Message Variables  Next Page: Where to Go from Here

Exploring Search Parameters

The following table lists all available search parameters, including required syntax, a description of their use, and an example. Each of these parameters can be used to extend or enhance the functionality of the search page templates, or to create new search page templates from scratch. For more information about how to implement parameters in an HTML document, see Building a Custom Search Solution.

HINT:  If you use a parameter but leave its value blank, the default value for that parameter will be used. Defaults are also listed in the Search Parameters table.


Table 9. Search Parameters

Parameter Name Value Description of Use

queryitems

Integer

Syntax: queryitems=number

Example: queryitems=0Identifies the number of queries that are part of the current search. By assigning a number greater than one (1), you can then pass multiple queries at once.The default queryitems number is zero (0).

querynumber

String

Syntax: querynumber=searchcriteria

Example: query0=novell+AND+groupwiseThe actual search criteria that is passed to the Web Search Server.

The next four or five parameters below belong to this parameter and are identified by adding the unique number to them.

idnumber

String

Syntax: idnumber=documentID

Example: &id0=z1.0010.&id0=z1.0020

A document ID that is used to narrow a search. You can specify more than one ID by using the same field name more than once.

The default is null.

operatornumber

Integer

Syntax: operatornumber=number

Example: operator0=1

Indicates which operator to use between two or more words in a search. Zero (0) equals AND, one (1) equals OR, and two (2) equals PHRASE.

weightnumber

Integer

Syntax: weightnumber=number

Example: weight0=75

Allows you to assign a level of importance to one or more search criteria. Web Search Server uses this number along with the relevance number to determine a search criteria's final relevance and then orders the results accordingly. You can choose a number from zero (0) to one-hundred (100).

typenumber

Integer

Syntax: typenumber=number

Example: type0=2

Indicates the type of search. Options include:

0: A normal search; 0 is the default.

1: Searches only the given document numbers.

2: A root search used by the search tree control to get the top tree nodes.

3: Used to get the children of the given document number.

4: Searches the descendants of the given document numbers and is used to narrow a search or a print request, including all of its children.

collection

String

Syntax: collection=collection name

Example: collection=Statistics

Allows you to restrict a search to one or more specified collections. The collection name you specify using the COLLECTION parameter must exactly match the name of the collection.

You can specify more than one collection by using the same key word, as in

collection=DocRoot&collection=myCollection.

date

Integer

Syntax: date=number

Example: date=-7905600000

Allows you to specify a date range to be searched in milliseconds. The example above shows the number of milliseconds spanning a three-month time frame. The minus sign (-) before the number indicates three months back in time.

If you pass a positive number such as 940457147873, then Web Search will create a date and time based on the number of milliseconds elapsed since January 1, 1970; 12:00 a.m. The example number 940457147873 produces the search start date of October 20, 1999, at 4:05:47 p.m.

numhits

Integer

Syntax: numhits=number

Example: numhits=25

Indicates the number of hits you want returned at one time in the search results page.

The default number of hits returned at one time is 25.

starthit

Integer

Syntax: starthit=number

Example: starthit=35

Indicates the hit number you want Web Search to begin searching from. If you entered 35 as the STARTHIT parameter value, Web Search would return hits beginning with hit number 35.The default STARTHIT number is 1.

lang

String

Syntax: lang=language code

Example: lang=ja

Allows you to specify a language using the two-character, lower-case language value derived from ISO6391.

See Where to Go from Here for the URL where you can refer to the ISO639 listing of language codes.

The default is "en" for English.

country

String

Syntax: country=country code

Example: country=TW

Allows you to specify your country using the two-character, upper-case country value derived from ISO3166.

See Where to Go from Here for the URL where you can refer to the ISO3166 listing of country codes.

This is the two character country code. The default is null.

template

String

Syntax: template=filename

Example: template=ResultList.html

Allows you to specify a specific results template you want your search results returned in. The following list of templates are the default templates included with the Web Search Server. However, your Web Search Server administrator may have created custom templates using different names. Check with your administrator if these templates do not work for you. You must type the names of these templates exactly as they appear in the list:

  • ResultListTemplate.html
  • ResultListTerseTemplate.html
  • ResultListVerbose.html
  • PrintResultTemplate.html

Localized versions for multiple languages can also be used. See Working with Additional Languages.

theme

String

Syntax: theme=theme name

Example: theme=Intranet

The name of the theme, or directory, where a theme's search and print templates are stored.

showfirsthit

Boolean

Syntax: showfirsthit=value

Example: showfirsthit=True

If true, rather than displaying the search results page, this parameter automatically goes to the URL of the first hit on the current page.

retfield

String

Syntax: retfield=field name

Example: retfield=title

Allows you to determine the level of detail given about each result item. The fewer the details, the faster a search is returned to a user.

Fields include title, author, url, changedate, language, summary, relevance, and filelength.

NOTE:  Type these fields exactly as they appear.

To specify more than one field, use the RETFIELD parameter and value, separated by an ampersand (&) as in

retfield=title&retfield=author.

buttonpressed

String

Syntax: buttonpressed=button name

Example: buttonpressed=Cancel

A button pressed by the user. If this value is part of the query, then a response message should not be sent to the client.

Options include Yes, No, OK, Cancel, Continue, Ignore, Retry, Prev, Next, and Help.

gettotalhits

Boolean

Syntax: gettotalhits=value

Example: gettotalhits=false

Allows you to enable or disable the total number of hits parameter. For example, if you set the GETTOTALHITS parameter to FALSE, the Total Number of Hits label on the results page will display zero (0). Setting this parameter to TRUE will show the total number of hits found during the search.

The default is True.

retencoding

String

Syntax: retencoding=content type

Example: retencoding=iso-8859-1

Allows you to specify a character set encoding to be used by all results pages returned to users.

The default is UTF8.

sortkeys

Integer

Syntax: sortkeys=number

Example: sortkeys=1

Allows you to specify the number of sort fields that should be used to sort the search results.

sortfield

String

Syntax: sortfieldnumber=number

Example: sortfield1=title

Allows you to specify the sort order of results returned in a results page.

Refer to the RETFIELD parameter for a list of available fields.

sortorder

Integer

Syntax: sortordernumber=number

Example: sortorder1=0

Allows you to specify the alphanumeric ordering of search result items, or hits. Options include:

  • Zero (0) = Ascending
  • One (1) = Descending
  • Two (2) = Default for each field.



  Previous Page: Exploring Response Message Variables  Next Page: Where to Go from Here