|Oracle8i interMedia Text Reference
Release 2 (8.1.6)
Part Number A77063-01
Loading Examples, 5 of 5
ctxloadText Load File
ctxload text load file must use the following format for each document, as well as any structured data associated with the document:
is a header marker that indicates the beginning of a document. It also may contain one or more of the following fields used to specify structured data for a document:
is the name of a column that will store structured data for the document.
is the structured data that will be stored in the column specified in col_name.
is the text of the document to be loaded or the name (and location, if necessary) of an operating system file containing the text to be loaded.
The data in text (either a string of text or a file name pointer) is treated by ctxload as literal data, including any non-alphanumeric characters or blank spaces that may occur. As a result, you must ensure that text exactly represents the data you wish ctxload to process.
For example, if you use ctxload to load text from separate files, the file names in the load file must exactly represent the name(s) of the operating-system file(s) containing the text. If any blank spaces are included in a file name, ctxload cannot locate the file and the text is not loaded.
indicates the end of the document.
The following conditions apply to the structure of the load file:
The following conditions apply to the syntax utilized in the text load file:
<TEXTEND>must each start on a new line
<TEXTSTART:...>string do not have to be in any particular order
<TEXTSTART:...>string must be on the same line as the last doc_data field for the document
<TEXTSTART: ... >string must be followed by the text of a document or a pointer to a separate file
<TEXTSTART: ... >string and must start on a new line
The following example illustrates a correctly formatted text load file containing structured employee information, such as employee number (1000, 1024) and name (Joe Smith, Mary Jones), and the text for each document:
<TEXTSTART: EMPNO=1000, ELNAME='Smith', EFNAME='Joe'> Joe has an interesting resume, includes...cliff-diving. <TEXTEND> <TEXTSTART: EMPNO=1024, EFNAME='Mary', ELNAME='Jones'> Mary has many excellent skills, including...technical, marketing, and organizational. Team player. <TEXTEND>
The following example illustrates a correctly formatted text load file containing structured employee information, such as employee number (1000, 1024) and name (Joe Smith, Mary Jones), and a file name pointer for each document.
<TEXTSTART: EMPNO=1024, EFNAME='Mary', ELNAME='Jones'> mjones.doc <TEXTEND> <TEXTSTART: EMPNO=1000, EFNAME='Joe', EFNAME='Smith'> jsmith.doc <TEXTEND>