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:
Crawl the help files to generate a full-text search index, if you haven’t already.
If you are using Elasticsearch, see PeopleSoft 9.2 Application Installation for your database platform, ”Installing PeopleSoft Online Help.” If you use a different search engine, see the documentation for your chosen search engine.
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
Enter the path to the index.html file in the psessearch folder. You can include the host and port, but it is better to include only the path. For example:
var searchURL = "/PeopleBooks/psessearch/index.html";
Note: You need to prepend the parent folder's URL path to “psessearch/index.html.” For example, If you install psessearch under the application called “PeopleBooks” and the URL is “http://hostname:port/PeopleBooks,” you need to add “/PeopleBook” to the beginning of the path.
Enter “product=” followed by the library title. To find the library title, view the HTML source of any online help page in the library and find the meta element with the name “productline-title.”
For example, assume that your library HTML files contain the following meta element:
<meta name="productline-title" content="PeopleSoft PeopleTools 8.56">
In this case, the searchOpt parameter would have the following value:
var searchOpt = "product=PeopleSoft PeopleTools 8.56";
Enter the parameter name for the search text. If you are using Elasticsearch, enter query.
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 = "/PeopleBooks/psessearch/index.html"; //"/PeopleBooks/psessearch/index.html" var altHelpURL = ""; //"http://www.oracle.com/pls/topic/lookup?id=%CONTEXT_ID%&ctx=hcm92pbr22" //"http://host/path/help.html?ContextID=%CONTEXT_ID%&LangCD=%Lang%" var searchOpt = "product=PeopleSoft PeopleTools 8.56"; //"product=PeopleSoft PeopleTools 8.56" var queryTextParamName = "query"; //"query"
Here is an example of 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 = "/PeopleBooks/psessearch/index.html"; var searchOpt = "product=PeopleSoft PeopleTools 8.56"; var queryTextParamName = "query";
The user enters the following text in the Search field: test
The help website generates the following URL: