HP 3000 Manuals

The Indexing File [ HP Search/XL User's Guide ] MPE/iX 5.0 Documentation


HP Search/XL User's Guide

The Indexing File 

HP Search has an optional feature that streams a batch job to update the
HP Search indexing file.  The indexing file is SRCHnnn.PUB (where "nnn"
is the system language number).  It contains information that allows HP
Search to avoid searching the areas in a file where a specified pattern
cannot possibly reside.  This information improves search performance by
reducing the number of disc sectors that HP Search needs to look at, thus
reducing the time needed to complete the search.  Indexing information
for all files specified is kept in one file.  Information generated in
later searches is added to this file.

Advantage of Using Indexing 

After placing information about your files in the indexing file, HP
Search can look for patterns much faster than it could without the
indexing file.  For any search you specify, HP Search uses existing
indexing information even if the INDEX option is not specified.

How Indexing Works 

Specifying the INDEX option on the command line applies to all files
searched.  The first time a file is searched, HP Search does not have
indexes for the file, so it must look in every line for the patterns you
have specified.  After the search has been completed, HP Search
determines which files need indexing and streams a batch job that updates
the indexing file.  HP Search updates the indexing file for the following
types of files:

 *  Files that have never been indexed.

 *  Files that have been indexed but have since been modified.

You will be prompted for passwords before HP Search starts the batch job:

     Streaming job to update indexes in SRCHnnn.PUB.
     Enter account password:

If necessary, HP Search also prompts you for your user and account
passwords before streaming the job.  After the job has been submitted
successfully, HP Search displays the job number on your terminal screen.

After HP Search updates the indexing file, future searches on the files
indexed run about twice as fast as when they were initially searched.
However, once these files are modified, they must be re-indexed before
they will be searched this fast again.  (This is because HP Search
ignores the information in the indexing file for a specific file if that
file has been modified since the indexing file was last updated.)

When to Use Indexing 

Because the job stream to update the indexes for a set of files takes
twice as much CPU time as simply searching the files, many times you
should not specify the INDEX option.  For the most efficient search 
performance, specify the INDEX option whenever you expect to search a 
file at least three times before modifying it. 



MPE/iX 5.0 Documentation