JObjects QuestAgent 3.0

QuestAgent - Search Applet Documentation
Basic, Geometry, Messages, Collections, Hit Display, Using QuestAgent
SearchApplet is the applet that provides all functionality of the QuestAgent. It may be configured with using following parameters:

PARAM Name
PARAM Value
IndexFile Name of the index file. This parameter consists of a file name defined by the OutputFileName parameter and path relative to an applet codebase.

To avoid security exception with some browsers, you should copy index file to a directory below applet's codebase. Check the html source in our examples.
BGColor Background RGB color of the applet represented as a hexadecimal number. For example: 

<PARAM NAME="BGCOLOR" VALUE="c0c0c0"> 

Also, you can use an applet_geom parameter to set applet's default color, font, font size, etc.

Target Frame name for document showing.
Default is the current frame.
Clock If this parameter is set to "on", the Quest Agent will print out searching statistics to Java console.
DisplayMode

If this parameter is set to "external" in an applet space will be shown a button instead of the search panel. Click on the button will pop an external search panel.

Tip: Use applet_geom parameter to set real panel size.

AutoLunch If this parameter is set to "yes" external view will popup right after applet loads.
Result_Format See hit display format.


Geometry parameters describe component's appearance (position, size, font, color). All values of geometry parameters has the following format: All fields (X, Y, Width, etc.) are optional, but ";" as separator is obligatory. For example:  
Geometry parameters and default values table:
 
PARAM name
Description
Default value
applet_geom QuestAgent applet
;;;;Dialog;14;;;;
qbox_geom query input box
85;5;400;26;;;;;;
list_geom list of documents
5;70;590;230;;;;;;
label1_geom label for query input box
25;5;60;26;;;;;Query:;
start_geom start searching button
495;5;85;26;;;;;Find;
stop_geom stop searching button
495;40;85;26;;;;;Stop;
newwin_geom check button for showin document in new window
290;40;145;26;;12;;;show in new window;
show_geom show document button
200;40;85;26;;;;;Show;
msglabel_geom status and message line
5;310;590;26;;12;;;;
hitchoice_geom max. hits choice
100;40;60;25;;12;;;;
maxhitslabel_geom max. hits label
25;40;75;25;;12;;;Show best;
collectionchoice_geom collection choice
85;5;400;26;;12;;;;
label2_geom label for collection choice
20;5;55;26;;12;;;Search in:;
 

All status messages that SearchApplet shows could be changed to customize applet for user's need or language. The following table shows Quest Agent applet parameter names and default message values.

PARAM name
Default message
MSG_WAIT Searching...
MSG_NO_MATCHES No matches.
MSG_COUNT Hits:
MSG_ERROR Error.
MSG_BAD_QUERY Bad query.

Multiple Document Collections

JObjects QuestAgent supports multiple document collections. For every document collection you need to specify a different index file and an appropriate collection description. For example:

<param name="IndexFile" value="data1/index.quest">
<param name="IndexDescription" value="Product Documentation">
<param name="IndexFile2" value="data2/index.quest">
<param name="IndexDescription2" value="Author Web Site">
An example above defines two collections: one for a product documentation and the other for author's web site. As you can see, all you need to do is to attach collection number to IndexFile and IndexDescription parameters. To control collection choice appearance use "collectionchoice_geom" parameter described above.

To display query results QuestAgent uses default "HitNumber. DocumentTitle" format. However, this format could be changed using the result_format applet parameter. For example, if you insert the following line into your search page QuestAgent will display all hits in the "DocumentTitle (FileLength)" format.

<PARAM NAME="result_format" VALUE="%D (%L)">

Supported format directives are:

Directive
Meaning
%N Hit Number
%D Document Title
%L File Length
%R Hit Relevance

 

 

Example: Using QuestAgent

If you've already indexed your document collection you are ready to prepare your first search page:

  1. create new html page in the $JOQUEST\questagent directory
  2. create new directory mydata
  3. copy (or move) all files from the indexing output directory (defined by OutputDir parameter) to the mydata directory
  4. insert the following html code into your page
	<APPLET 
		CODE="com.jobjects.quest.SearchApplet.class" 
		ARCHIVE = "qagent30.zip"
		width=600 height=300
	>
	<PARAM NAME="CABBASE" VALUE="qagent30.cab">
	
	<PARAM NAME="IndexFile" VALUE="mydata/index.quest">
	<PARAM NAME="start_geom" VALUE=";;;;;;;;Start;">
	<PARAM NAME="MSG_COUNT" VALUE="Number of hits:">
	</APPLET> 

 You are ready to try QuestAgent. Open the page using your favorite browser.

 


Copyright © 1997, 1998 JObjects - All right reserved.
contact@jobjects.com