FindinSite-JS: Search engine for a Java server website   .
  search
Powered by FindinSite-JS
. Home | Installation | Indexing | Configuration | Advanced | Purchasing .
. .
  Init parameters | Look and Feel | Languages | Word highlighting | Runtime parameters | Rules | Subsets | Meta-data fields

 

findinsite-js runtime parameters


Introduction

Runtime parameters are values sent from a form on a page to findinsite-js.  They can either be values that a user has typed in (such as the search text) or they can be hidden values that are specified in the HTML. 

Here is a typical form that is used to send a search request to findinsite-js:

Search for:
This is the HTML used to make this form:
<form method="get" action="/findinsitejs/search">
Search for:
<input name="Text" type="text" size="20" maxlength="80" />
<input NAME=cs type=hidden value="utf-8" />
<input type="submit" value="Search" />
</form>
The URL for findinsite-js is in the action attribute of the form tag in the first line.  The actual URL you will have to use may be different from the example above.  (Note that findinsite-js accepts both GET and POST form methods.)

Each input tag in the HTML above represents a form runtime parameter.  In this case, there are three parameters:

  • a "text" type parameter called Text that becomes the search text box on screen
  • a "hidden" parameter called cs that specifies the charset of this page - more information.
  • a "submit" type parameter that becomes a button on screen with a label "Search"


Adding more form runtime parameters

A list of all possible runtime parameters is shown below.
  • For example, to change the number of hits that you want displayed per results sheet, then set the ResultsPerSheet parameter.  This could be a text entry box, a radio box selection or a hidden fixed parameter. For example, to always display 5 hits per result sheet, add the following hidden parameter:
    <input name="ResultsPerSheet" type="hidden" value="5" />
  • Runtime parameters are also used if you want to provide a Subset search option to users when you have more than one search database available - see here for full details.


Specifying runtime parameters in URLs

You can also specify runtime parameters directly in the URL given to findinsite-js (using the GET method).

Most people will use this technique to start the findinsite-js Configuration screen, eg:

http://localhost/findinsitejs/search?config=now

However, ordinary searches can be run directly if you want.  For example, a search for "the end" can be sent using the following URL, where the runtime parameters are shown in green.

http://localhost/findinsitejs/search?ResultsPerSheet=10&Text=%22the+end%22
A question mark must appear after the findinsite-js primary URL.  Then give a list of parameters separated by & characters.  Each parameter is the name, an equals sign and then the value.

URLs are not allowed to contain some characters, eg spaces and double quotes.  Therefore the search text "the end" must be changed into %22the+end%22.  The browser does this for you automatically if you use a standard web page form.


Runtime parameters list

It is important to get the letter case of all runtime parameters correct.

Parameter
name
Description Default
config If present, shows the findinsite-js Configuration screen  
cs If present, specifies the character set (charset) used on the page - more information. ISO-8859-1
PickSubsets If present, indicates that SubsetN parameters are used to indicate the search database subsets that the user wants to use.  More information.  
ResultsPerSheet How many pages to put on each results sheet 10
SheetNo The results sheet number, 0 or greater 0
SubsetN If PickSubsets present, each Subset1, Subset2, etc. parameter present indicates that the corrresponding search database subset should be searched.  More information.  
Text The text to search for  
Debugging parameters
getversiondetails If present, displays findinsite-js information  
showattributes If present, displays the servlet engine attributes  
showheaders If present, displays the headers sent by your browser  
  All site Copyright © 1996-2011 PHD Computer Consultants Ltd, PHDCC   Privacy  

Last modified: 15 September 2005.

Valid HTML 4.01 Transitional Valid CSS!