Oracle Context Option Administrator's Guide | ![]() Library |
![]() Product |
![]() Contents |
![]() Index |
The executables and utilities discussed in this chapter are:
Note: ctxsrv and ctxsrvx can only be executed by the Oracle user, CTXSYS. The CTXSYS user is created automatically during installation of ConText Option.
The ctxsrvx executable starts a ConText server with the Linguistic Services disabled. The executable for ctxsrvx is considerably smaller than ctxsrv, resulting in less memory required to run the executable.
Note: A ConText server started by ctxsrvx will process all requests, except requests for Linguistic Services (document themes or Gists). If you want to process requests for Linguistic Services, use ctxsrv.
In addition, if you want to generate theme indexes or perform theme queries, do not use ctxsrvx to start ConText server processes.
You can also use the ctxctl utility to start and shut down ConText servers. For more information about ctxctl, see "ctxctl Utility" in this chapter.
ctxsrv|ctxsrvx -user ctxsys/passwd[@sqlnet_address] [-personality RQDML] [-logfile log_name] [-sqltrace]
where:
-user
specifies the username and password for the Oracle user, CTXSYS.
The username and password may be immediately followed by '@sqlnet_address' to permit logon to remote databases. The value for sqlnet_address is a database connect string.
If the TWO_TASK environment variable is set, you do not have to specify a value for sqlnet_address to connect to a remote database.
-personality
specifies the personality mask for the ConText server started by ctxsrv/ctxsrvx. The possible values can be any combination of:
R Loader personality
Q Query personality
D DDL personality (create and drop indexes)
M DML personality (update text table)
L Linguistic personality
The default is QDM.
Note: Oracle does not recommend assigning all the personalities to a single ConText server. This will result in the server bearing the majority of the processing load.
In addition, If you choose to execute ctxsrvx, do not specify a Linguistic personality in the command-line. If you do, the ConText server will start up; however, it will not process requests for the Linguistic Services.
-logfile
specifies the name of a log file to which the ConText server writes all session information and errors.
-sqltrace
enables the ConText server to write to a trace file in the directory specified by the USER_DUMP_DEST initialization parameter.
Before you specify -sqltrace for ctxsrv or ctxsrvx, you should specify a value for USER_DUMP_DEST in your initsid.ora file.
ctxsrv -user ctxsys/ctxsys -personality QD -log ctx.log
Note: If both of the ctxsrv and ctxsrvx executables are available, the ctxctl utility starts ConText servers using the ctxsrvx executable. If both executables are available and you want to start up a ConText server using ctxsrv, you must call ctxsrv directly from the host machine command-line.
ctxctl
Once ctxctl is running, you can issue the following commands from the ctxctl prompt:
help [command]
Provides online help for the specified command. If called without a command, it provides a list of all the commands you can use in ctxctl.
status
Provides a list of all the ConText servers and their personality masks currently running on the server host.
Note: The ConText servers listed in the status output may be connected to different database instances.
start n loader query ddl dml linguistic
Starts n number of servers, each with all the personalities specified. The personalities can be typed in any order.
The following example starts two ConText servers, each with a Linguistic, DML, and DDL personality mask:
start 2 linguistic dml ddlNote: The ConText server(s) will be started on the host machine from which the start command is issued.
stop pid
Shuts down the ConText server identified by pid. The status command provides the pid for all currently running ConText servers.
quit|exit
Terminates ctxctl and returns you to the command-line of the host machine.
Suggestion: If the target table does not contain a LONG or LONG RAW column or you do not want to load text into a LONG or LONG RAW column, you may want to use SQL*Loader to populate the table with text.
Note: The ctxload utility does not support load files that contain both embedded text and file pointers. You must use one method or the other when creating a load file.
The ctxload utility creates one row in the table for each document identified by a header in the load file.
For more information about creating a load file for text loading, see "Structure of Text Load File" in this chapter.
An import file is an ASCII flat file that contains an entry for each synonym, broader term, and narrower term which can be used to expand queries.
For more information about creating an import file for thesaurus importing, see "Structure of Thesaurus Import File" in this chapter.
ctxload can also be used to export a thesaurus by dumping the contents of the thesaurus into a flat file.
ctxload -user username[/password][@sqlnet_address] -name object_name -file file_name [-thes] [-thesdump] [-separate] [-longsize n] [-date date_mask] [-log file_name] [-trace] [-commitafter n] [-verbose]
Specifies the username and password of the user running ctxload.
The username and password can be followed immediately by '@sqlnet_address' to permit logon to remote databases. The value for sqlnet_address is a database connect string.
-name
If ctxload is being used to load text, -name specifies the name of the table to be loaded. The table must be accessible to the user specified in the command-line.
If ctxload is being used to import a thesaurus, -name specifies the name of the thesaurus to be imported. The thesaurus name is used to specify the thesaurus to be used for expanding query terms in queries.
Note: Thesaurus name must be unique. If the name specified for the thesaurus is identical to an existing thesaurus, ctxload returns an error and does not overwrite the existing thesaurus.
If ctxload is being used to export a thesaurus, -name specifies the name of the thesaurus to be exported.
-file
If text is being loaded, -file specifies the name of the load file which contains the document header markers, structured data, and embedded long data (text) or filename pointers (see the -separate argument).
If a thesaurus is being loaded, -file specifies the name of the load file which contains the thesaurus entries.
If a thesaurus is being exported, -file specifies the name of the export file created by ctxload.
Note: If the name specified for the thesaurus dump file is identical to an existing file, ctxload overwrites the existing file.
Specifies that ctxload imports a thesaurus. The file from which it loads the thesaurus is specified by the -file argument. The name of the thesaurus to be imported is specified by the -name argument.
-thesdump
Specifies that ctxload exports a thesaurus. The name of the thesaurus to be exported is specified by the -name argument. The file into which the thesaurus is dumped is specified by the -file argument.
-separate
For text loading, specifies that the text of each document in the load file is actually a pointer to a separate text file. During processing, ctxload loads the contents of each text file into the LONG or LONG RAW column for the specified row (document).
-longsize
For text loading, specifies the maximum number of kilobytes to be loaded into the LONG or LONG RAW column. This argument may be necessary for loading separate data and to help reduce memory usage when loading smaller embedded data.
The minimum value is 1 (Kb, i.e. 1024 bytes) and the maximum value is machine-dependent. The default is 64 (Kb).
Note: The value for -longsize must be entered as a numeric value. Do not include a 'K' or 'k' to indicate Kilobytes.
-date
Specifies the TO_CHAR date format used for any date columns loaded using ctxload.
For more information about the available date format models, see Oracle7 Server SQL Reference.
-log
Specifies the name of the log file to which ctxload writes any national-language supported (NLS) messages generated during processing. If you do not specify a log file name, the messages appear on the standard output.
-trace
-commitafter
Specifies the number of rows (documents) that are inserted into the table before a commit is issued to the database. The default is 1.
-verbose
Specifies that non-NLS messages can appear on standard output.
Also, because -separate was not specified, ctxload expects the text for each document to be embedded in the reviews.txt file.
ctxload -user jsmith/123abc -name docs -file review.txt -log log2.out
ctxload -user jsmith/123abc -thes -name tech_doc -file tech_thesaurus.txt
ctxload -user jsmith/123abc -thesdump -name tech_doc -file tech_thesaurus.dmp
<TEXTSTART: col_name1=doc_data, col_name2=doc_data,. . . , col_nameN=doc_data,. . .> TEXT . . . <TEXTEND>
where:
<TEXTSTART: ... >
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:
col_name is the name of a column that will store structured data for the document.
doc_data is the structured data that will be stored in the column.
TEXT
is the actual text of the document or a pointer to a separate file containing the text.
<TEXTEND>
indicates the end of the 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>
<TEXTSTART: EMPNO=1024, EFNAME='Mary', ELNAME='Jones'> mjones.doc <TEXTEND> <TEXTSTART: EMPNO=1000, EFNAME='Joe', EFNAME='Smith'> jsmith.doc <TEXTEND>
Note: To use the load file in this example, you would have to specify the -separate argument when executing ctxload.
To use ctxload with external data store columns, the following conditions must exist:
<TEXTSTART: EMPNO=1010, ENAME='Mary Jones'> mjones.pdf <TEXTEND>
In this example, the file name 'MJONES.PDF' will be loaded into the LONG column for the table and the structured employee information, such as employee number (1010) and name (Mary Jones), will be loaded into the specified columns.
Suggestion: Because a LONG column is an inefficient means of storing file pointers, you probably do not want to use ctxload to load file pointers into columns that use the external data store. You may want to consider using SQL*Loader to load the file pointers instead.
phrase BT broader_term NT narrower_term1 NT narrower_term2 . . . NT narrower_termN BTG broader_term NTG narrower_term1 NTG narrower_term2 . . . NTG narrower_termN BTP broader_term NTP narrower_term1 NTP narrower_term2 . . . NTP narrower_termN SYN synonym2 SYN synonym2 . . . SYN synonymN USE synonym1 RT related_term1 RT related_term2 . . . RN related_termN SN text
where:
phrase
is a word or phrase that is defined as having synonyms, broader terms, narrower terms, and/or related terms.
Note: In compliance with ISO-2788 standards, a TT marker can be placed before a phrase to indicate that the phrase is the top term in a hierarchy; however, the TT marker is not required. In fact, ctxload ignores TT markers during import.
In ConText Option, a top term is identified as any phrase that does not have a broader term (BT, BTG, BTP).
BT, BTG, BTP, NT, NTG, NTP
are markers that indicate the relationship between the phrase and its broader (generic|partitive) terms and narrower (generic|partitive) terms.
If an entry does not have a broader (generic|partitive) term, but has one or more narrower (generic|partitive) terms, the entry is created as a top term.
SYN, USE
are markers that indicate the relationship between the phrase and its synonyms (SYN), as well as the preferred synonym (USE) for the phrase.
RT
is the marker that indicates the relationship between the phrase and its related terms.
SN
is the marker that indicates the following text is a scope note (comment) for the preceding entry.
broader_term
is a word or phrase that conceptually provides a more general description or category (broader term) for phrase.
For example, the word elephant may have a broader term of land mammal.
narrower_term
is a word or phrase that conceptually provides a more specific description (narrower term) for phrase.
For example, the word elephant may have a narrower terms of indian elephant and african elephant.
synonym
is a word or phrase that has the same meaning (synonym) for phrase.
For example, the word elephant may have a synonym of pachyderm.
related_term
is a word or phrase that has a meaning related to, but not necessarily synonymous with phrase.
For example, the word elephant may have a related term of wooly mammoth.
Note that related terms are not transitive. If a phrase has two or more related terms, the terms are related only to the parent phrase and not to each other.
VIEW CAMERAS SN Cameras with through-the lens focusing and a range of movements of the lens plane relative to the film plane
VIEW CAMERAS SN Cameras with through-the lens focusing and a SN range of movements of the lens plane relative SN to the film plane
MOVING PICTURE CAMERAS NT CINE CAMERAS TELEVISION CAMERAS
MOVING PICTURE CAMERAS NT CINE CAMERAS NT TELEVISION CAMERAS
cat SYN feline cat NT domestic cat NT wild cat BT mammal mammal BT animal domestic cat NT persian cat NT siamese cat wild cat NT bengal tiger dog BT mammal NT domestic dog NT wild dog SYN canine
35MM CAMERAS BT MINIATURE CAMERAS CAMERAS BT OPTICAL EQUIPMENT NT MOVING PICTURE CAMERAS NT STEREO CAMERAS LAND CAMERAS USE VIEW CAMERAS VIEW CAMERAS SN Cameras with through-the lens focusing and a range of SN movements of the lens plane relative to the film plane UF LAND CAMERAS BT STILL CAMERAS
![]() ![]() Prev Next |
![]() Copyright © 1996 Oracle Corporation. All Rights Reserved. |
![]() Library |
![]() Product |
![]() Contents |
![]() Index |