The System Search Builder template is stored on the server that is specified in the Server field. Tealeaf administrators can edit this template if they have permissions to access the server.
On the server, the template is stored in the following location:
<install_directory\system\SearchBuilder.xml
The SearchBuilder.xml
file and RTVBuilder.xml
files are in XML format and can be edited with any text editor.
In the template field, specifications are references to index fields in the Short-Term Canister and Long-Term Canister.
Template types
Each system or custom template file can contain multiple templates. Depending on the type of sessions (active or completed), you must edit the appropriate template.
RTV cannot be used to complete All Sessions searches. You must search by using an Active search template or a Completed search template.
The template file contains comments that explain how to edit the file and the meaning of the names. The default template declaration nodes look like:
<Template Name="Default" Type="standard">
<Template Name="Default" Type="active">
Standard templates are used for searches of completed sessions under standard indexing. Active templates are used for searches of active sessions; indexing does not apply.
The following examples show templates to search for text (login ID) and numbers (hit count).
Text field example
This example specifies a text field to include in a completed search template. The field
value indicates the index field to search for values that are specified by the user.
<FieldSearch title="Login ID" description="Login ID"
field="TltStsLoginID" type="text" operator="contains" selected="true" />
where:
type
, in this example, istext
.operator
: Specifies the operator to apply to the field. For this text example, the search operator iscontains
.selected
: When set totrue
, the field is preselected when the search tab is opened by the RTV user.
Numeric field example
This example specifies a numeric field to include in a completed search template. The field
value indicates the index field to search for values that are specified by the user.
<FieldSearch title="Hit Count" description="TltStsNumHits"
field="TltStsNumHits" type="numeric" operator="all"
maxValue="4096" />
Where:
type
, in this example, isnumeric
.operator
: Specifies the operator to apply to the field. Accepted values:all
(recommended setting)=
not
>=
<=
between
not between
maxValue
The maximum value for the numeric value.- By default, this setting is configured to be the largest value possible for a signed 32-bit integer, which corresponds to the upper bound accepted by the search engine.
- If you know that a value is never greater than a specific number, the search is more efficient if you set
maxValue
to that number.
Customizing session attribute fields in the search template
You can add search fields for specific session attributes. A session attribute is a user-defined variable that is populated by an event. Tealeaf supports the creation of up to 64 session attributes.
- Session attributes are specified at the search template level by using search keywords that include a zero-based index number to the specific attribute. Numbering is as follows: 0, 1, 2, and on through 63.
- Session attributes can also be added to Portal search templates.
Complete the following steps to add a session attribute to the default completed search template for RTV:
- Open the system-wide SearchBuilder template file and find the appropriate template to edit.
- Locate the section labeled
<Template Name="Default" Type="standard">
. - Locate the grouping that holds all of the User Defined Fields depending on the type of search. If the following does not exist, insert it:
<Group title="Session Attributes" description="Session Attributes">
- Insert the following XML into the template, changing it as needed for these examples.
-
<FieldSearch title="Login ID" description="Login ID" field="tltstscustomvar0" type="text" operator="contains" HTMLcolsize="40"/>
-
<FieldSearch title="Session Attribute 03" description="Session Attribute 03" field="customvar3" type="text" operator="contains" HTMLcolsize="40"/>
Attribute Description title
This value appears in the RTV Search Builder. description
This value appears when the search term is moused over. field
This value identifies the index term for the session attribute. The above value ( tltstscustomvar0
) is the reference LTC index keyword for Session Attribute 00.type
The session attribute's type of value. Accepted values are text
andnumeric
.operator
The operator for the search field HTMLcolsize
(optional) The width of characters of the textbox for data entry - Edit the attributes as needed.
- Save the file.
- Close and open RTV to see your changes.
- In RTV, load the search template from the server.
-
Session attribute search configuration terms
Depending on the type of search template you are configuring, you must specify session attribute search configuration terms by using the following keywords.
Template type | Session attribute index | Completed search configuration term |
---|---|---|
Active | Session Attribute 00 (LoginId) | field="customvar0" |
Active | Session Attribute 01 | field="customvar1" |
Active | Session Attribute 63 | field="customvar63" |
Completed | Session Attribute 00 (LoginId) | field="tltstscustomvar0" |
Completed | Session Attribute 01 | field="tltstscustomvar1" |
Completed | Session Attribute 63 | field="tltstscustomvar63" |
Request search configuration
You can configure RTV search fields to scan fields or sections of the request, or the entire request.
For example, critical session data can be inserted into the [appdata]
section of the request, since this section is automatically indexed. In the examples below, you can see how to configure RTV to search the request, the [appdata]
section, or a specific field in the [appdata]
section.
Search area | Search Keyword | Notes |
---|---|---|
entire request | request |
Searches the entire request. |
[appdata] section |
request/appdata |
Searches the [appdata] section of the request for a user-specified value. |
MobileDeviceType variable of the [appdata] section |
request/appdata/mobiledevicetype |
Searches the MobileDeviceType field in the [appdata] section of the request for a user-specified value. |
request
and request/appdata
keywords can be used for searches for both active and completed sessions.Field to search entire request
<FieldSearch title="All Request" description="All Request"
field="request" type="text" operator="contains" selected="true" />
Field to search the [appdata] section
<FieldSearch title="AppData" description="AppData"
field="request/appdata" type="text" operator="contains" selected="true" />
Field to search for a value in the MobileDeviceType variable in the [\appdata] section
<FieldSearch title="Mobile Event" description="Mobile Event"
field="request/appdata/mobiledevicetype" type="text"
operator="contains" selected="true" />
Form field search configuration
Field Search specifies a form field to include in the template.
<FieldSearch title="FormField" description="FormField"
field="formfield" type="formfield" />
IP address field configuration
For completed session search templates, you can insert the following fields to enable RTV users to search for IP addresses among completed sessions.
<FieldSearch title="IP address" description="ipv6_remote_addr"
field="ipv6_remote_addr" type="text" operator="contains" />
<FieldSearch title="IP address (legacy)" description="TltStsIPaddr"
field="TltStsIPaddr" type="text" operator="contains" />
Field Name | Search Keyword | Description |
---|---|---|
IP Address |
ipv6_remote_addr |
Search for IP addresses in IPv6 format or IPv4 format
|
IP Address (legacy) |
tltstsipaddr |
Search for IP addresses in IPv4 format
Data that is entered into fields of this type are zero-padded and normalized into a single string of digits before submission for search. |
Word search configuration
Word search passes the specified search string directly to the search engine, bypassing the field contains value
form structuring. When used with the hidden_text
type, a search template can contain search entries that are submitted without any user input.
<WordSearch title="ASP Errors" description="ASP Errors" field="freetext"
type="hidden_text" textValue="(response contains (error w/5 ASP))" />