Home > Contents > Index >
Template Tags TOC   |    Alpha TOC   |    Tag Family TOC   |    Purpose TOC   |    Annotated TOC   |    Index 

 

ics:search

Searches an index based on a query.

Syntax

Parameters

index (optional)
Name of the index to search. Default is specified in the Content Server properties file.

searchterm (required)
Query to submit. This should be in the format the given search engine understands and may also depend on the queryparser value.

listname (required)
Name of the output list. Columns returned are:

queryparser (optional for Verity)
The AltaVista search engine supports three search types--Simple, Advanced, and Combined. Advanced is the default, and was previously the only one supported.

The simple search syntax uses optional + or - signs on a word or phrase to indicate that it is required or prohibited in the search results. The Advanced syntax uses Boolean operators (such as and, or, not, near) to constrict complex queries. In both cases, the query is passed in the searchterm parameter. The relevanceterm parameter is ignored.

The combined syntax uses both types of syntax. A Boolean query is specified by the searchterm parameter and a simple query is specified by the relevanceterm parameter to determine the ranking order of the results.

The Verity search engine supports three query parsers--Simple, FreeText, and BoolPlus. The optional queryparser tag tells the Verity search engine the syntax of the searchterm. If this argument is omitted, then the Simple parser is used by default. The parser may be specified by the verity.parser property in the futuretense.ini file. The choice of parser determines the syntax and form of the query

relevanceterm (optional for AltaVista)
Boolean term to be used for computing relevance ranking.

maxresults (optional)
Maximum number of results to return to the list.

charset (optional)
Constant value representing the character set the index uses.

For the AltaVista search engine this value can be 0, 1, or 2 (ISO_LATIN1, ASCII8, UTF8). If you do not specify charset, Content Server uses the value of av.charset from the Content Server properties file.

Because Java Strings are transformed to UTF8, as they pass through the JNI interface to AltaVista, the 0 value only works for 7-bit ASCII. For all other cases, use the value for UTF8.

For the Verity search engine, this value specifies the name of the subdirectory of the common directory where the locale is defined. If you do not specify charset, Content Server uses the value of verity.charset in the Content Server properties file.

searchengine (optional)
Name of the search engine to use. If searchengine is not specified, Content Server uses the value of cs.searchengine from the Content Server properties file.

Description

The ics:search tag searches an index based on a query. The resultset of the query is stored in a list.

errno

The possible values of errno include:

Value
Description
-101
No search results.
-800
Bad search type.
-801
Cannot load search engine.
-802
Unsupported search function.
-805
No default index specified.
-806
Unknown search engine.
-809
Search failed.
-810
Bad character set.
-811
Could not call native method.
-812
Index does not exist.

Example

See Also

ics:indexcreate

  Home > Contents > Index >

FatWire JSP Tag Reference
Copyright 2005 by FatWire Software
All rights reserved.