Enabling the Search Button and Field

To make full-text searching available to users you need to set up the user interface to make the Search field available and display the Search button in the page banner.

To enable full-text searching:

  1. Crawl the help files to generate a full-text search index, if you haven’t already.

    If you are using Oracle Secure Enterprise Search, see PeopleTools Installation for your database platform, ”Installing PeopleSoft Online Help.” If you use a different search engine, see the documentation for your chosen search engine.

  2. Modify the docroot/js/common.js file to set the following variables, which are used to generate the search engine URL that the help site uses:

    Field or Control

    Definition

    searchURL

    Enter the URL for the search homepage. In Secure Enterprise Search, this is the URL for the search source group that you created when you crawled the help files to generate a full-text search index.

    searchOpt

    Enter optional parameters that are appended to the URL that is generated from the values of the searchURL, queryTextParamName, and the text that the user enters in the Search field. For example, if you are using Secure Enterprise Search, you can specify source groups to search. To do this, enter group=SourceGroupName, where SourceGroupName represents the name of the source group in Secure Enterprise Search. Always enter a name and value pair (for example, field1=value1). To add multiple values, separate the name and value pairs with ampersands (for example, field1=value1&field2=value2&field3=value3).

    Note: For more information on adding multiple source groups, see Including External Documentation in Full-Text Search Results.

    queryTextParamName

    Enter the parameter name for the search text. If you are using Secure Enterprise Search, enter the lowercase letter q.

    The following example shows the common.js file with values added for the search variables (highlighted in bold).

    Note: The file contains sample values as comments (preceded by //) for each variable.

    /**
     * common.js
     **/
    var searchURL = "http://example.com:7777/search/query/";  //"http://host:port/search/query";
    var altHelpURL = "";		//"http://www.oracle.com/pls/topic/lookup?id=%CONTEXT_ID%&ctx=hcm92pbr6"
                          //"http://host/path/help.html?ContextID=%CONTEXT_ID%&LangCD=%Lang%
    var searchOpt = "group=pt855";          //group=pt853
    var queryTextParamName = "q"; //q

Example

Here is an example how the help website generates the search engine URL based on the values that you enter in the common.js file:

Assume that the following values are specified in the common.js file:

var searchURL = "http://host:port/search/query"; 
var searchOpt = "group=pt855&search_p_atname=Host&search_p_op=contains&search_p_val=abc6110000"; 
var queryTextParamName = "q";   

The user enters the following text in the Search field: test

The help website generates the following URL:

http://host:port/search/query?q=test&group=pt855&search_p_atname=Host&search_p_op=contains&search_p_val=abc6110000