Home > Contents > Index > 
INDEXADD
Adds an entry to an existing search index.
Syntax
<INDEXADD ENTRY="ENTRY_NAME" [INDEX="INDEX_NAME"] [DETAIL="ENTRY_DETAIL"] [WORDLIST="WORDS"] [WORDLISTDELIMITERS="DELIMITERS"] [FILELIST="FILES"] [DATE="DATE_STRING"] [CHARACTERSET="CHAR_SET"] [SEARCHENGINE="NAME"] <FILEARGUMENTNAME="FILEARG_NAME" VALUE="FILEARG_VALUE"/> <DATEARGUMENTNAME="DATEARG_NAME" VALUE="DATEARG_VALUE"/> <TEXTARGUMENTNAME="TEXTARG_NAME" VALUE="TEXTARG_VALUE"/> </INDEXADD>Parameters
ENTRY (required)- Name of the index entry to add. This value is returned in the search results. The
 ENTRYvalue must be unique within an index. ChooseENTRYvalues carefully so that the caller of the search can reference the associated article(s).
INDEX (optional)- Name of the index to which the
 ENTRYshould be added. If this parameter is not specified, the value of the Content Server propertyav.defaultindexis used.
DETAIL (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
 WORDLISTDELIMITERSparameter 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
 TEXTARGUMENTtag and theWORDLISTparameter. White space is used as delimiter characters ifWORDLISTDELIMITERSis not specified.
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
 DATEis specified, theINDEXADDtime is returned in the search results. Format is in Java SQL.
CHARACTERSET (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
 CHARACTERSET, Content Server uses the values ofav.charsetfrom 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
 CHARACTERSET, Content Server uses the value ofverity.charsetin the Content Server properties file.
SEARCHENGINE (optional)- Name of the search engine to use. If
 SEARCHENGINEis not specified, Content Server uses the value ofcs.searchenginefrom the Content Server properties file.
Description
The
INDEXADDtag adds an entry to an existing search index.For both AltaVista and Verity, arguments are optional using
FILEARGUMENT,DATEARGUMENTandTEXTARGUMENTtags. These arguments specify the index field (theNAMEparameter) to which the data (theVALUEparameter) is to be added. When using theFILEARGUMENTvalue with AltaVista, specify a comma-separated list of files to add to the index with the given name. When using theFILEARGUMENTvalue 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. TheDATEARGUMENTis a date string specified in JAVASQL format. TheTEXTARGUMENTvalue is a string delimited by white space. The white-space delimiter characters may be overridden by theWORDLISTDELIMITERStag.The search engine collects arguments with the same name into a concatenated single value for that field.
errno
The possible values of
errnoinclude:
 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
This example adds an entry (Article 083742132) to the Article index.
<SETVAR NAME="errno" VALUE="0"/> <INDEXADD INDEX="c:/ArticleIdx" SEARCHENGINE="AV" ENTRY="Article083742132"> <FILEARGUMENT NAME="body" VALUE="c:/articledata/083742132.body"/> <FILEARGUMENT NAME="body" VALUE="c:/articledata/083742132/*.txt"/> <TEXTARGUMENT NAME="headline" VALUE="Clinton to vacation in Massachusetts."/> </INDEXADD> <IF COND="IsError.Variables.errno=true"> <THEN> <!--Handle error--> </THEN> </IF>See Also
Home > Contents > Index > ![]()
FatWire XML Tag Reference
Copyright 2005 by FatWire Software
All rights reserved.