Automatically Updating the Search Engine
Knowledge Base Article kb02
Introduction
Whilst maintaining
the pages that you are using Search Maker Pro to index, you may find that
you need to recreate the search.html file when pages are updated, added
or removed.
This can be
done by running Search Maker Pro again to recreate the search.html file.
This is a one step process if you save a configuration file after indexing.
However the
entire search recreation process can be automated for solutions that require
a reindex at frequent or specified intervals. For instance you may be using
the software to create a search for the contact information on your intranet.
The search would need to be refreshed on a daily basis to reflect ever
changing contact information stored within the web pages.
Command Line Options
You can achieve
this automation by using Command Line Options. These are parameters that
are passed to the application when it starts.
The syntax
used to automate Search Maker Pro is:
searchmp.exe
/o <rhm configuration file> [/s <file name>] [/m1] [/m2 <number
of chars>] [/m3 <max file size>]
Command Line
Example
This command
line:
searchmp.exe
/o c:\myweb\default.rhm /s z:\intranet\publish\contact\search.html
/m2 5000
will open the
saved configuration file c:\myweb\default.rhm, index the website, reduce
the amount indexed to 5000 characters per page, and save the search engine
to z:\intranet\publish\contact\search.html
Command Line
Reference
| /o
<rhm configuration file> |
Open a previously saved Search Maker
Pro configuration file. |
| /s
<full filename> |
Save the generated
search.html file. The full filename must be provided, such as C:\My
Documents\Webroot\search.html. If this switch
is not used then the file is saved to C:\search.html |
| /m1 |
Minimize the
size of the generated file using option 1, "Remove all body text". |
| /m2
<number of chars> |
Minimize the
size of the generated file using option 2, "Specify maximum number of characters
to index for each page". |
| /m3
<max file size (KB)> |
Minimize the
size of the generated file using option 3, "Specify maximum size of search.html
file". |
Automating
the Script
The final
step needed in our example is to automate the running the command. This
can be done using your operating systems "Scheduled Tasks" option. This
is available in Windows 98/ME/NT/2000/XP.
First create
a batch file using a text editor and type your single command line. This
should be saved as a batch file, for example "Update Contact Search.bat"
By selecting
the "Add scheduled task" you can set the script to run this batch file
(which will run Search Maker Pro with your preferred options) at any preferred
interval.
Note that it is required that the scheduled task is run under the user account that
installed and registered the application on the system.
Support Page