Home > Contents > Index >
INDEXDESTROY
Deletes an existing search index.
Syntax
<INDEXDESTROY INDEX="INDEX_NAME" [CHARACTERSET="CHAR_SET"] [SEARCHENGINE="NAME"]/>Parameters
INDEX (required)
- Full path name of the index to delete. If you specify a nonexisting
INDEX_NAME
,INDEXDESTROY
does not return an error.
CHARACTERSET (optional)
- Constant value representing the character set the index uses.
- For the AltaVista search engine this value may be
0
,1
, or2
(ISO_LATIN1, ASCII8, UTF8). If you do not specifyCHARACTERSET
, Content Server uses the value ofav.charset
in 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
CHARACTERSET
, 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
INDEXDESTROY
tag deletes an existing search index.If you call
INDEXEXISTS
after deleting an index,INDEXEXISTS
returns-812
(indicating that the index no longer exists).For AltaVista, after calling
INDEXDESTROY
to delete an existing index, the base directory specified in theINDEX
parameter usually still exists and contains an empty lock file. In this case,INDEXEXISTS
still reports, as expected, that the index does not exist.For Verity, after calling
INDEXDESTROY
to delete an existing index, the entire directory structure is left.
Note
The
INDEXDESTROY
tag deletes indexes only. Directories that contain the indexes must be deleted manually for both AltaVista and Verity .errno
The possible values of
errno
include:
Value Description -801 Cannot load search engine. -804 Delete index failed. -805 No default index specified. -806 Unknown search engine.Example
This example deletes the Article index.
<SETVAR NAME="errno" VALUE="0"/> <INDEXDESTROY INDEX="C:ArticleIdx" SEARCHENGINE="AV"/> <IF COND="IsError.Variables.errno=true"> <THEN> <!--Handle error--> </THEN> </IF>See Also
Home > Contents > Index > ![]()
FatWire XML Tag Reference
Copyright 2005,2006,2007 by FatWire Software
All rights reserved.