Home > Contents > Index > 
Template Tags TOC | Alpha TOC | Tag Family TOC | Purpose TOC | Annotated TOC | Index 
ics:indexexists
Use this tag to check for the existence of an index.
Syntax
<ics:indexexists index="index name" [charset="character sat"] [searchengine="name"]/>Parameters
index (required)- Full path name of the index to check.
 
charset (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 specifycharset, Content Server uses the value ofav.charsetin 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 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.
errno
The possible values of
errnoinclude:
 Value Description 9 Index exists. -806 Unknown search engine. -812 Index does not exist.Example
The following example checks for the existence of
c:ArticleIdxand creates it if it doesn't exist.
<ics:clearerrno/> <ics:indexexists index="c:/articleidx" searchengine="AV"/> <ics:if condition='<%=ics.GetErrno() != 9%>'> <ics:then> <ics:indexcreate index="c:/articleidx" searchengine="AV"/> </ics:then> </ics:if>See Also
Home > Contents > Index > ![]()
FatWire JSP Tag Reference
Copyright 2005,2006,2007 by FatWire Software
All rights reserved.