![]() |
![]()
| ![]() |
![]()
NAMEdtsrcreate — Create and initialize a DtSearch database SYNOPSISdtsrcreate [-q] [-o] [-fd] [-fa] [-aabstr] [-ddir] [-wnmin] [-wx max] [-llang] dbname DESCRIPTIONThe dtsrcreate command creates and initializes an instance of a DtSearch database. A DtSearch database consists of a set of related files. If the specified database already exists, after prompting for confirmation, dtsrcreate will erase and reinitialize the preexisting database. Database NameThe dbname argument is the database name. It is a 1 to 8 ascii character string used at creation time as a base file name, and as a general database identifier thereafter. All created database files are named by assembling the base name, plus a period and a 1 to 3 ASCII character suffix. The database names dtsearch and austext are reserved and may not be specified. Target DirectoryThe dbname argument can include an optional path prefix. If it does, the database files will be created and initialized in the specified target directory. If no path prefix is specified, the target directory is the current working directory. Model FileOne of the created database files is based on a model file, dtsearch.dbe, provided with DtSearch. Database creation will fail if the model file cannot be found. dtsrcreate looks for the model file first in the directory specified by a command line option, if any; secondly in the current working directory; and thirdly in the optional dbname target directory. Configuration OptionsDtSearch databases can be customized with a number of configuration options that are specified only at creation time. Initialization consists of loading into the database a configuration and status record identifying the configuration options for the particular database instance. After initialization, dtsrcreate prints a small report of the current contents of the configuration record to stdout. (See also dtsrdbrec(1), which prints the report without changing the database). Database TypesThe customizable features available at database creation time fall into clusters of related capabilities that constitute a set of basic database types. When you select a database type, you prespecify a number of features that are optimized for the basic type of database you want. In the DtSearch database type, documents are not stored in a repository and are not available from the search engine after a search. The abstract returned from a search typically contains a document reference, usually the file name, and the application is itself responsible for accessing the document. Hilighting of search words is possible when the application passes the document cleartext back to the DtSearch API. In an AusText database type, compressed documents are stored directly into a repository and the originals are thereafter ignored. The abstracts returned from searches are typically descriptive of the documents they represent, and are displayed directly to users. Documents can be retrieved from an AusText type database through the API, and the search words are highlighted as desired. OPTIONSThe following options are available: Note:
If an option takes a value, the value must be directly appended to the option name without white space.
OPERANDThe dbname operand specifies the new DtSearch database. It consists of an optional path prefix, a 1- to 8-character database name, an optional period, and an optional 1- to 3-character extension. This is the name that the other build tools and the the search API will use to reference the database. ENVIRONMENT VARIABLESNone. RESOURCESNone. ACTIONS/MESSAGESNone. RETURN VALUESThe return values are as follows:
FILESdtsrcreate reads dtsearch.dbe. It creates or reinitializes the following database files:
It deletes the file dbname.d99. Note that not all necessary database files are created by dtsrcreate. Some additional files are included in the DtSearch distribution, are created by later database build programs, or may be provided by the developer. EXAMPLESCreate a standard DtSearch type database named mydb that will index ASCII English words of standard length for that language. dtsrcreate mydb
Create an AusText type database named jpndb. It will index Japanese words expressed in packed EUC, with automatic compounding of all kanji substrings. When the text contains embedded ASCII, words that are between 2 and 20 characters long will be indexed. At least 150 bytes will be available for the abstract field. Caretdtsrcreate -fa -a150 -wn2 -wx20 -l6 jpndb
SEE ALSOdtsrdbrec(1), DtSrAPI(3), dtsrdbfiles(4), DtSearch(5)
|