INVERT, LOOKUP(1,C) AIX Commands Reference INVERT, LOOKUP(1,C)
-------------------------------------------------------------------------------
invert, lookup
PURPOSE
Creates and accesses an inverted index.
SYNTAX
+-------------+
invert ---| +---------+ |--- file ---|
+-| -c file |-+ ^ |
| -k i | +--------+
| -l i |
| -p file |
| -%str |
| -s |
+---------+
+-------------+
lookup ---| +---------+ |---|
+-| -c file |-+
^| -l ||
|| -p file ||
|+---------+|
+-----------+
Note: This command does not have MBCS support.
DESCRIPTION
The invert command creates an inverted index to one or more files. The lookup
command retrieves records from files for which an inverted index exists. The
inverted indices are intended for use with bib.
The invert command creates one inverted index to all of its input files. The
index must be stored in the current directory and may not be removed. Input
files are absolute path names or paths relative to the current directory. Each
input file is viewed as a set of records. Each record consists of non-blank
lines and records that are separated by blank lines.
The lookup command retrieves records based on its input (stdin). Each line of
input is a retrieval request. Records that contain all of the keywords in the
retrieval request are sent to stdout. If there are no matching references, the
message No References Found is sent to stdout. The lookup command first
searches the user's private index (default INDEX). If no references are found,
it then searches in the system index (/usr/dict/papers/INDEX). The system
index is produced using invert with the default options. The user is advised
to use the defaults.
Processed November 8, 1990 INVERT, LOOKUP(1,C) 1
INVERT, LOOKUP(1,C) AIX Commands Reference INVERT, LOOKUP(1,C)
Keywords are a sequence of non-white space character with non-alphanumeric
characters removed. Keywords must be at least two characters and are truncated
(default length is 6). Some common words are ignored. Some lines of input are
ignored for the purpose of collecting keywords.
FLAGS
The following flags apply to both invert and lookup:
-c File is the name of a file containing common words, one per line.
Common words are not used as keys. (Default is /usr/lib/bmac/common.)
-l Maximum length of keys. (Default is 6.)
-p File is the name of the private index file, output of invert. (Default
is INDEX.) Index must be stored in the current directory.
Note: The lookup command accepts only the options c, l, and p with the
same meanings as bib. In particular, the p option can only be
followed by a list of comma-separated index files. These are
searched in order from left to right until at least one
reference is found.
The following flags apply to invert only:
-k The space following -k is optional. The maximum number of keys kept
per record. (Default is 100.)
-s Suppresses statistics.
-%str Ignores lines that begin with %x, where x is in str. (Default is
CNOPVX.) See the commands "bib, listrefs" for an explanation of field
names.
FILES
INDEX Inverted index.
/usr/tmp/invertxxxx Scratch file for invert.
/usr.lib.bmac/common Default list of common words.
/usr/dict/papers/INDEX Default system index.
DIAGNOSTICS
Messages indicating trouble accessing files are sent on stderr. There is an
explicit message on stdout from lookup if no references are found.
The invert command produces a one-line message of the form:
%D document %D distinct keys %D key occurrences
This can be suppressed with the -s option.
Processed November 8, 1990 INVERT, LOOKUP(1,C) 2
INVERT, LOOKUP(1,C) AIX Commands Reference INVERT, LOOKUP(1,C)
The message
locate: first key (%s) matched too many refs
indicates that the first key matched more references than could be stored in
memory. The simple solution is to use a less-frequently
RELATED INFORMATION
See the bib, listrefs commands in the AIX Operating System Commands Reference.
Processed November 8, 1990 INVERT, LOOKUP(1,C) 3