This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
admin:indexing:text:retrieve [2012/01/31 17:10] doc |
admin:indexing:text:retrieve [2016/06/28 22:38] (current) |
||
|---|---|---|---|
| Line 10: | Line 10: | ||
| **[[admin:indexing:text:retrieve|External Files]]** | | **[[admin:indexing:text:retrieve|External Files]]** | | ||
| [[admin:indexing:text:proximity|Proximity Searches]] | | [[admin:indexing:text:proximity|Proximity Searches]] | | ||
| + | [[admin:indexing:text:advanced|Advanced Searches]] | | ||
| [[admin:indexing:text:results|Displaying Results]] | | [[admin:indexing:text:results|Displaying Results]] | | ||
| [[admin:indexing:text:relevancy|Relevancy]] | [[admin:indexing:text:relevancy|Relevancy]] | ||
| Line 23: | Line 24: | ||
| The $RETRIEVE_FILE function references a column in the table that contains the filename. When the function is processed for each row, the respective file is opened and the contents are deposited into the expression-based column. The expression-based column can then be indexed and queried as needed. | The $RETRIEVE_FILE function references a column in the table that contains the filename. When the function is processed for each row, the respective file is opened and the contents are deposited into the expression-based column. The expression-based column can then be indexed and queried as needed. | ||
| - | <code sql> | + | === Sample Database === |
| - | create table "LIBRARY" | + | |
| - | physical "dat/library.dat" | + | To demonstrate the $RETRIEVE_FILE function, and to provide examples for this section, we will use the following BOOKS table, which catalogs popular books. |
| + | |||
| + | <code> | ||
| + | create environment | ||
| + | in "books.xml" | ||
| + | with delete; | ||
| + | |||
| + | create database "TEXT" | ||
| + | type file | ||
| + | index_directory "idx" | ||
| + | in "books.xml"; | ||
| + | |||
| + | create table "BOOKS" | ||
| + | options "delimited" | ||
| + | physical "dat/books.txt" | ||
| ( | ( | ||
| - | "DOC_ID" INTEGER omnidex, | + | "DOC_ID" character(8) omnidex, |
| - | "TITLE" CHARACTER(80) fulltext, | + | "CLASS" character(4) omnidex, |
| - | "SUBTITLE" CHARACTER(80) fulltext, | + | "FICTION" character(1) omnidex, |
| - | "AUTHOR_FIRST_NAME" CHARACTER(32) quicktext, | + | "LANGUAGE" character(32) omnidex, |
| - | "AUTHOR_LAST_NAME" CHARACTER(32) quicktext, | + | "TITLE" string(80) fulltext, |
| - | "LANGUAGE" CHARACTER(16) quicktext, | + | "AUTHOR" string(80) fulltext usage "NAME", |
| - | "FILENAME" CHARACTER(256), | + | "SOURCE" string(80) quicktext, |
| - | "CATALOG_DATE" ANSI DATE, | + | "FILENAME" string(255) quicktext, |
| - | "CONTENT" STRING(16MB) fulltext | + | "CONTENT" string(1MB) fulltext usage "TEXT" |
| - | as "$retrieve_file(FILENAME, 'STRING(16MB)')", | + | as "$retrieve_file(FILENAME, 'STRING(1MB)')", |
| + | constraint DOC_ID_PK primary ("DOC_ID"), | ||
| ) | ) | ||
| - | in "library.xml" | + | in "books.xml"; |
| </code> | </code> | ||