Home > Contents > Index >
SEARCHDATENATIVE
Converts the Java SQL formatted date to the date format native to the search engine.
Syntax
<SEARCHDATENATIVE DATE="JAVA_DATE" NAME="VAR_NAME" [CHARACTERSET="CHAR_SET"] [SEARCHENGINE="NAME"]/>Parameters
DATE (required)
- The Java SQL date to convert.
NAME (required)
- The name of the variable to store the converted date string.
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
from 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
SEARCHDATENATIVE
tag converts the Java SQL formatted date to the date format native to the search engine. Use in theWHAT
parameter of aSEARCH
tag. Dates in queries must be in a format that the search engine can parse.It is important that the input to this tag (the
DATE
parameter) be a valid Java SQL date. Content Server does not detect certain errors in the date format.The Verity search engine handles most date formats, including the Java SQL format. If you are using Verity, you do not need to call
SEARCHDATENATIVE
.errno
The possible values of
errno
include:
Value Description -801 Cannot load search engine.Example
This example converts the date in Java SQL format to the AltaVista date format and sets the results in the variable
AVDate
.<SETVAR NAME="errno" VALUE="0"/> <SEARCHDATENATIVE DATE="1998-05-22" NAME="AVDate" SEARCHENGINE="AV"/> <IF COND="IsError.Variables.errno=true"> <THEN> <!--Handle error--> </THEN> </IF>
Home > Contents > Index > ![]()
FatWire XML Tag Reference
Copyright 2005,2006,2007 by FatWire Software
All rights reserved.