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 field searches


Introduction

Information about a file (or parts of a file) is called meta-data.  For example, the HTML TITLE tag defines meta-data for a web page - a "title" field.  Similarly, this HTML can be used to define an "author" field for a page:
<meta name="author" content="Chris Cant" />
findinsite-js indexes this information, so it will be found by an ordinary search.  See here for details of what fields are found.  The RDF/XML plug-in is not currently supported.

You can also set up field search forms so that users can only search the required fields, eg search for author "Cant".


Field search

The standard findinsite-js form can be extended to search specific fields, as shown by the following example.

Fields must be specified by form elements whose names start with fld_.  For example, a search of the "author" field should be specified by an INPUT element named fld_Author. The letter case of the element name does not matter. Other form element tags can be used, eg BUTTON, SELECT/OPTION and TEXTAREA.

findinsite-js will report an error if a field does not exist in the search database.

<form method="get" action="/findinsitejs/search">
  Search for:	<input name="Text" type="text" size="30" maxlength="80" /><br />
  Keywords:	<input name='fld_Keywords' type="text" size="30" maxlength="80" /><br />
  Language:	<select name="fld_lang" multiple size="3">
		  <option value="*" selected>Any
		  <option value="en">English
		  <option value="zh">Chinese
		  <option value="zh TW">Chinese Traditional
		  <option value="de">German
		  <option value="ja">Japanese
		</select> 
		<input name="cs" type="hidden" value="UTF-8" />
		<input type="submit" value="Search" />
</form>

Try an online version of this form, searching the phdcc site:

Search for:
Keywords:
Language:

The search terms are shown in the top and bottom template using the %SEARCH_TEXT% and %FIELDS_TEXT% template variables. Examples:

User input Displayed output Template variable
Find Find %SEARCH_TEXT%
Keywords field: search
Language field: English and Chinese
[keywords:search] [lang:en zh] %FIELDS_TEXT%
  All site Copyright © 1996-2011 PHD Computer Consultants Ltd, PHDCC   Privacy  

Last modified: 15 September 2005.

Valid HTML 4.01 Transitional Valid CSS!