Administration: Omnidex Indexing

Omnidex Text

Retrieving External Files

Omnidex allows a table to point to a collection of external text files. Some of the columns in the table can contain information about an external text file. When the table is read, the text from the external file is retrieved and presented as a large text column in the table. In this manner, queries against the table can also include criteria against the contents of the external files.

Omnidex allows this by using an Expression-based Column. An expression-based column is a virtual column declared in the table that does not exist in the underlying relational table or raw data file. Instead, the column is fulfilled by a SQL expression each time a row is read. Omnidex provides a $RETRIEVE_FILE SQL function that can be used in an expression-based column.

The $RETRIEVE_FILE function references another column in the table that contains the filename. When the function is processed for each row, the file will be open and the contents will be deposited into the expression-based column. The expression-based column can then be indexed and queried as needed.

CREATE TABLE          "LIBRARY"
 physical             "dat/library.dat"
 (
  "DOC_ID"            INTEGER                omnidex,
  "TITLE"             CHARACTER(80)          fulltext,
  "SUBTITLE"          CHARACTER(80)          fulltext,
  "AUTHOR_FIRST_NAME" CHARACTER(32)          quicktext,
  "AUTHOR_LAST_NAME"  CHARACTER(32)          quicktext,
  "LANGUAGE"          CHARACTER(16)          quicktext,
  "FILENAME"          CHARACTER(256),
  "CATALOG_DATE"      ANSI DATE,
  "CONTENT"           STRING(16MB)           fulltext
    AS "$retrieve_file(FILENAME, 'STRING(16MB)')",
 )
 IN                   "library.xml"

Additional Resources

See also:

 
Back to top
admin/indexing/text/retrieve.txt ยท Last modified: 2012/10/26 14:57 (external edit)