Home > Contents > Index >
INDEXCREATE
Creates a search index.
Syntax
<INDEXCREATE INDEX="INDEX_NAME" [FIELDARGUMENT="VERITY_SUBFIELD"] [CHARACTERSET="CHAR_SET"] [SEARCHENGINE="NAME"]/>Parameters
INDEX (required)
- The full path name of the index to create is required in the tag unless the properties
av.defaultindex
orverity.defaultindex
have been specified in thefuturetense.ini
file.
FIELDARGUMENT (optional, used by Verity only)
- Defines subfields of a Verity search index. Index subfields must be defined when
INDEXCREATE
is called. ValidFIELDARGUMENT
types areDATE
andTEXT
.
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, UTF8, ASCII8). If you do not specify
CHARACTERSET
, 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. Note that case-sensitivity is important with directory names. 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
INDEXCREATE
tag creates a search index. For AltaVista, this creates the directory where the index is stored. For Verity, however, this creates a more complex base structure for the index in the directory specified by theINDEX
parameter. In particular, it needs to create the structures that hold the field information for the index. Therefore, the fields that are used must be specified usingFIELDARGUMENT
tags when the index is created.errno
The possible values of
errno
include:
Value Description -801 Cannot load search engine. -802 Unsupported search function. Content Server 3.0 and earlier returned this error; however, Content Server 3.1 and higher no longer return this error. -803 Create index failed. -805 No default index specified. -806 Unknown search engine. -811 Could not call native method. -815 Duplicate field values. (Verity only) -819 Unrecognized field type. (Verity only) -822 Index already exists.(Verity only)Example
This AltaVista example creates the Article index used to save article information. The index is stored as
C:ArticleIdx.avx
, but you don't specify the.avx
extension in the tag.<INDEXCREATE INDEX="C:ArticleIdx" SEARCHENGINE="AV"/>The following Verity example creates the Article index used to save article information. The index is stored as
C:ArticleIdx.vix
, but you don't specify the.vix
extension in the tag. Subfields are specified for headlines and article dates.<SETVAR NAME="errno" VALUE="0"/> <INDEXCREATE INDEX="C:ArticleIdx" SEARCHENGINE="VERITY"> <FIELDARGUMENT NAME="Headline" VALUE="TEXT"/> <FIELDARGUMENT NAME="ArticleDate" VALUE="DATE"/> </INDEXCREATE> <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.