Creates a variable with the given
name and value,
for further use in other indexer.conf
or search.htm commands, or as a search.htm template variable.
If the variable has previously been created with another ReplaceVar or ImportEnv command, then its old value is replaced.
The value parameter can
reference to other variables previously created by
ReplaceVar or ImportEnv commands
using $(name) syntax.
Variables created using ReplaceVar are considered to have the character set with the one specified in LocalCharset. When being displayed in search template, variable values are converted to BrowserCharset.
ReplaceVar can also be used to set
search query parameters
in search.htm, without having to pass them in CGI query
string. This example sets sorting order to title,
like if the s=s&su=title parameters would have been
passed in CGI query string:
ReplaceVar s s
ReplaceVar su title
Note: ReplaceVar has higher precedence over CGI query string parameters. In the above example search.cgi will sort search results strictly in
titleascending order, no matter what the user pass insandsuquery string parameters.