Home > Contents > Index >
Template Tags TOC | Alpha TOC | Tag Family TOC | Purpose TOC | Annotated TOC | Index
ics:indexadd
Adds an entry to an existing search index.
Syntax
<ics:indexadd entryname="entry name" [index="index name"] [entrydetail="entry details"] [wordlist="words"] [wordlistdelimiters="delimiters"] [ics:filelist="files"] [date="date string"] [charset="character set"] [searchengine="name"]> <ics:fileargument
name="file argument" value="file argument value"/> <ics:dateargument
name="date argument name" value="date argument value"/> <ics:textargument
name="text argument" value="text argument value"/> </ics:indexadd>Parameters
entryname (required)
- Name of the index entry to add. This value is returned in the search results. The
entry
value must be unique within an index. Chooseentry
values carefully so that the caller of the search can reference the associated article(s).
index (optional)
- Name of the index to which the
entry
should be added. Default is specified in the Content Server properties file.
entrydetail (optional)
- Detail text returned in search results.
wordlist (optional)
- Words to add to the index. These are whitespace-separated by default but you can use the
wordlistdelimiters
parameter to specify something else. Use this parameter to add text that is not associated with a field of the index.
wordlistdelimiters (optional)
- String containing delimiter characters to use to separate words in the value of the
TEXTics:argument
tag and thewordlist
parameter. White space is used as delimiter characters ifwordlistdelimiters
is not specified.
ics:filelist (optional)
- For AltaVista, specify a comma-separated list of files to add. For Verity, specify a single file (not a list of files). Use this parameter to add text that is not associated with a field of the index.
date (optional)
- Date string to add to the index entry. If no
date
is specified, theics:indexadd
time is returned in the search results. Format is in Java SQL.
charset (optional)
- Constant value representing the character set the index uses. For the AltaVista search engine this value may be 0, 1, or 2 (ISO_LATIN1, ASCII8, UTF8). If you do not specify
charset
, Content Server uses the values ofav.charset
from the Content Server the properties file.
- 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 ofverity.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 ofcs.searchengine
from the Content Server properties file.
Description
The
ics:indexadd
tag adds an entry to an existing search index.For both AltaVista and Verity, arguments are optional using
ics:fileargument
,ics:dateargument
andics:textargument
tags. These arguments specify the index field (thename
parameter) to which the data (thevalue
parameter) is to be added. When using theics:fileargument
value with AltaVista, specify a comma-separated list of files to add to the index with the given name. When using theics:argument
value with Verity, specify a single file (not a list of files). Use this parameter to add text that is not associated with a field of the index. Theics:dateargument
is a date string specified in JAVASQL format. Theics:textargument
value is a string delimited by white space. The white-space delimiter characters may be overridden by thewordlistdelimiters
parameter.The search engine collects arguments with the same name into a concatenated single value for that field.
errno
The possible values of
errno
include:
Value Description -300 File not found. -801 Cannot load search engine. -804 Add index failed. -805 No default index specified. -806 Unknown search engine. -811 Could not call native method. -812 Index does not exist. -815 Duplicate field values. (Verity only) -816 Could not create temporary populate file. (Verity only) -817 Could not create temporary data file. (Verity only)Example
The following example adds an entry to an existing AltaVista search index.
<ics:clearerrno/> <ics:indexadd index="c:/avindex" entryname="A111111" date="1999-01-29" entrydetail="Example index entry" searchengine="AV"> <ics:textargument name="headline" value="Clinton to seek third term"/> <ics:fileargument name="body" value="c:/articles/clinton12423.txt"/> </ics:indexadd> <ics:if condition=<%ics.GetErrno() != 0%>'> <ics:then> Report error </ics:then> </ics:if>See Also
Home > Contents > Index > ![]()
FatWire JSP Tag Reference
Copyright 2005,2006,2007 by FatWire Software
All rights reserved.