Oracle Context Option Application Developer's Guide Go to Product Documentation Library
Library
Go to books for this product
Product
Go to Contents for this book
Contents
Go to Index
Index



Go to previous file in sequence Go to next file in sequence

CHAPTER 12. Result Tables


This chapter describes the database schema of the result tables utilized by ConText Option. Result tables are database tables that store results from the CTX_QUERY.CONTAINS and CTX_QUERY.HIGHLIGHT procuedres.

The topics described in this chapter are:

Hitlist Table Structure

The hitlist result table stores the results returned by the CTX_QUERY.CONTAINS procedure in the first step of a two-step query. The results can be queried directly to produce a hitlist for the query or combined with the base table to produce more detailed hitlists.

A hitlist result table must be created before executing a two-step query. It can be created manually or using CTX_QUERY.GETTAB.

If the hitlist table is created manually, it can be given any name; however, the table must have the following columns (with names and datatypes as specified).

Name Type Desc
TEXTKEY VARCHAR2(64) Unique identifier (usually the primary key for the table) for documents that satisfy the two-step query
SCORE NUMBER Score generated by CONTAINS function for each document
CONID NUMBER ID for results returned by CONTAINS function when multiple CONTAINS use the same hitlist result table

Hitlist Result Tables and Composite Textkeys

When you perform a two-step query on a text table that has a composite textkey, the schema of the resulting hitlist table is the same as for when you issue a query on a table with a single column textkey, except that a composite textkey result table has additional TEXTKEY columns.

The number of TEXTKEY columns in the hitlist table match the number of columns in the textkey for the original text table. The TEXTKEY columns in the hitlist table are named TEXTKEY, TEXTKEY2, TEXTKEY3, ..., TEXTKEYN, where N is the number of columns in the textkey in the original text table. N is always less than or equal to 16.

For example, if you do a query on a text table that had a four-column composite textkey, the schema of the resulting hitlist table is: TEXTKEY, TEXTKEY2, TEXTKEY3, TEXTKEY4, SCORE, CONID.

The resulting TEXTKEY columns in the hitlist table are populated in the same order as they were registered in the column policy.

Highlight Table Structures

The highlight result tables store the highlighting results returned by the CTX_QUERY.HIGHLIGHT procedure.

Highlight tables must be created before calling HIGHLIGHT to generate highlighting results. They can be created manually or using CTX_QUERY.GETTAB.

If a highlight table is created manually, it can be assigned any name; however, the table must have the columns (with names and datatypes) as specified.

ICFTAB Highlight Table

The ICFTAB highlight table stores the ICF output generated by CTX_QUERY.HIGHLIGHT.

Note: ICF output is used primarily by the Windows 32-bit viewer to provide WYSIWIG viewing of documents in the supported formats. As such, it is stored as binary data in a LONG RAW column and is generally inaccessible to users.

The table must have the following columns:

Name Type Desc
ID NUMBER The identifier for the results generated by a particular call to CTX_QUERY.HIGHLIGHT (only used when table is used to store results from multiple HIGHLIGHTS)
DOCUMENT LONG RAW Text of the document, stored in ICF format

HIGHTAB Highlight Table

The HIGHTAB highlight table store query term offset and length information for query terms in documents.

If a document is formatted, the text is filtered by CTX_QUERY.HIGHLIGHT into plain text and the offset information is generated for the filtered text. The offset information can be used to highlight query terms in a document.

The table must have the following columns:

Name Type Desc
ID NUMBER The identifier for the results generated by a particular call to CTX_QUERY.HIGHLIGHT. Only used when table is used to store results from multiple HIGHLIGHTS.
OFFSET NUMBER The position of the query terms in the document, relative to the rest of the terms in the documents. Measured from a base of 1.
LENGTH NUMBER The length of the query term.
STRENGTH NUMBER The strength of the highlight table.

MUTAB Highlight Table

The MUTAB display table stores documents in plain text (ASCII) format with the query terms in the documents highlighted by mark-up tags generated by CTX_QUERY.HIGHLIGHT. This mark-up can be used to provide an ASCII version of the document with query terms highlighted.

The highlighting mark-up tags can be specified when HIGHLIGHT is called or the default mark-up tags can be used.

Note: For HTML documents filtered through the internal HTML filter, the MUTAB stores the document with the original HTML tags.

For HTML documents filtered through an external filter, as well as all other documents filtered through internal or external filters, MUTAB stores the plain, marked-up text of the document.

The table must have the following columns:

Name Type Desc
ID NUMBER The identifier for the results generated by a particular call to CTX_QUERY.HIGHLIGHT (only used when table is used to store results from multiple HIGHLIGHTS)
DOCUMENT LONG Marked-up text of the document, stored in ASCII format

Display Table Structures

The display result tables store the display results returned by the CTX_QUERY.HIGHLIGHT procedure. The display results can be either the document in its original format or the document filtered to plain (ASCII) text.

Display result tables must be created before calling HIGHLIGHT to generate display output. They can be created manually or using CTX_QUERY.GETTAB.

If a display table is created manually, it can be assigned any name; however, the table must have the columns (with names and datatypes) as specified.

NOFILTAB Display Table

The NOFILTAB display table stores formatted documents in their native format (i.e. WordPerfect, Microsoft Word, HTML, ASCII). No highlighting or filtering is performed on the text of the document.

The table must have the following columns:

Name Type Desc
ID NUMBER The identifier for the results generated by a particular call to CTX_QUERY.HIGHLIGHT (only used when table is used to store results from multiple HIGHLIGHTS)
DOCUMENT LONG RAW Text of the document, stored in the original format

PLAINTAB Display Table

The PLAINTAB display table stores documents in plain text (ASCII) format. The documents are processed through the filter defined for the text column and the results are stored in the PLAINTAB table.

The table must have the following columns:

Name Type Desc
ID NUMBER The identifier for the results generated by a particular call to CTX_QUERY.HIGHLIGHT (only used when table is used to store results from multiple HIGHLIGHTS)
DOCUMENT LONG Text of the document, stored in ASCII format




Go to previous file in sequence Go to next file in sequence
Prev Next
Oracle
Copyright © 1996 Oracle Corporation.
All Rights Reserved.
Go to Product Documentation Library
Library
Go to books for this product
Product
Go to Contents for this book
Contents
Go to Index
Index