Zoom Search Engine FAQ - Command line options

Q. How do I use the command line options with the Zoom Indexer?

For Windows

The Zoom Indexer accepts command line parameters if you wish to use it with an automated scheduling program or just to create a convenient shortcut in Windows. The usage definition is:

ZoomIndexer [auto-run option] <config-file> [incremental options]

Auto-run options:

-s Auto-run in spider mode, start indexing as soon as the application loads. This option requires that a config-file be specified also.
-o Auto-run in offline mode, and start indexing as soon as the application loads. This option requires that a config-file be specified also.
-r Auto-run Statistics Report Generator. This will automatically create the search statistics page based on the report options saved in the config file specified.
-c Console mode (Enterprise Edition only). When using this mode, Zoom will run without a GUI window, and output all log messages to standard outout (stdout). With the use of pre-configured .ZCFG configuration files, the Zoom Indexer can be spawned as a process to index files as needed. Console mode is useful if you embedding the Zoom indexing engine inside another application and want to hide the Zoom user interface. See the Users Guide for more details.

<config-file> Configuration file to load on start up.

You may want to enable saving of the index log to a file when using the above features. This would assist in troubleshooting and determining if an index ran successfully. You can do so from the "Index log" tab of the Configuration window and making sure to use a ZCFG file with this setting enabled.

Note that each of these modes are mutually exclusive - you can not run Zoom in more than one mode at once. If you need to schedule an indexing and a report generation at the same time, you will have to run ZoomIndexer twice (once with the indexing option, and once with the report generating option).

Incremental indexing options

The following command-line options allow you to call upon the incremental indexing features along with the auto-run options. This allows developers to call Zoom to perform these operations via external scripts or applications (eg. you could have a server-side script which calls Zoom to add a new start point to an existing index when a user submits them via a web page). Note that these same options are available from the graphical user interface (under the Index menu).

-update This will perform an incremental update (as described above) on the specified ZCFG file. You must also specify the index mode (offline or spider) and the config file like so: ZoomIndexer.exe -s zoom.zcfg -update
-addpage This will add a specific page to the existing index specified by the config file and index mode. eg. ZoomIndexer.exe -s zoom.zcfg -addpage http://www.mywebsite.com/newpage.html Note that if you are using offline mode, you will need to specify a base URL following the addpage URL with a semi-colon (";") character, eg. ZoomIndexer.exe -o zoom.zcfg -addpage C:\mywebsite\newpage.html;http://www.mywebsite.com/
-addpages This is the same as -addpage but allows you to specify a text file containing a list of new pages (rather than calling it for one page only). eg. ZoomIndexer.exe -s zoom.zcfg -addpages newpages.txt Note that if you are using offline mode, you will need to specify a base URL following the filename with a semi-colon (";") character, eg. ZoomIndexer.exe -o zoom.zcfg -addpage C:\mywebsite\newpages.txt;http://www.mywebsite.com/
-addstartpt This option will perform an incremental add start point operation on the specified config file and index mode. eg. ZoomIndexer.exe -s zoom.zcfg -addstartpt http://www.mynewsite.com/ Offline mode will expect a base URL following the start directory (separated by a semi-colon character). eg. ZoomIndexer.exe -o zoom.zcfg -addstartpt C:\mynewwebsite\;http://www.mynewwebsite.com/
-addstartpts This is the same as -addstartpt but allows you to specify a text file containing a list of start points.

In spider mode, the format of this text file is the same as the "Import start points" feature, which allows you to specify spidering options such as "index and follow" or "index only", etc. As well as allowing you to specify a Limit of the number of pages to index for each start point. See the chapter on "Importing and exporting additional URLs" in the Users Guide for more information.
-deletepage This parameter will delete the specified page from the index as configured by the ZCFG file given and the index mode specified. eg. ZoomIndexer.exe -s zoom.zcfg -deletepage http://www.mywebsite.com/oldnews.html

Notes for Mac

Running the Zoom For Mac indexer from the command-line is similar to the Windows method above. The same command-line parameters are available. However, there are some additional parameters required and the path to the executable is different.

On the Mac, you need to pass the command line parameters to the ZoomEngine core executable. This would be found in the "/Library/Application Support/Wrensoft/Zoom Search Engine/" folder.

You will need to specify the -console parameter as described above.

You will also need to specify a -udp parameter for the working user data path.

The following is an example of launching the Zoom For Mac executable from the command-line, in Spider Mode with default installation paths.

/Library/Application Support/Wrensoft/Zoom Search Engine/ZoomEngine -console -s /Users/ray/Documents/myconfig.zcfg -udp /Users/ray/Library/Application Support/Wrensoft/Zoom Search Engine

This can be used for cron jobs and similar scripting purposes. Please note that if you are entering this into the Terminal, you will need to escape spaces in your folder names with a backward slash, e.g. "\ " so the above would look as follows:

/Library/Application\ Support/Wrensoft/Zoom\ Search\ Engine/ZoomEngine -console -s /Users/ray/Documents/myconfig.zcfg -udp /Users/ray/Library/Application\ Support/Wrensoft/Zoom\ Search\ Engine

Note also the User folder name should be changed to your user name (or the user account which Zoom is installed under).

The rest of the parameters (including incremental indexing options) are available as described in the Windows section.

Notes for Linux

Running the Zoom For Linux indexer from the command-line is similar to the Windows method above. The same command-line parameters are available. However, there are some additional parameters required.

On Linux, you need to pass the command line parameters to the ZoomEngine core executable. This would be found in the same folder as your ZoomIndexer.php page.

You will need to specify the -console parameter as described above.

The following is an example of launching the Zoom For Linux executable from the command-line, in Spider Mode assuming we are in the folder where Zoom was installed.

./ZoomEngine -console -s myconfig.zcfg

This can be used for cron jobs and similar scripting purposes.

The rest of the parameters (including incremental indexing options) are available as described in the Windows section.

Return to our Zoom Search Engine Support page