# $Id: onsearch.cfg,v 1.27 2005/07/31 06:44:11 kiesling Exp $

# OnSearchDir - Name of the directory where OnSearch's HTML and 
# CGI files are.  The directory should be a subdirectory of Apache's 
# DocumentRoot directory.  See the httpd.conf file to find out which 
# directory Apache uses for DocumentRoot.  The complete path of 
# OnSearchDir is (DocumentRoot)/(OnSearchDir).

OnSearchDir onsearch

# SearchRoot - The top-level directory or directories that OnSearch
# searches.  Typically this is the same value as Apache's DocumentRoot 
# directory, but you might want to limit searches to a subdirectory,
# because index files add considerably to the disk space required, 
# and because you may want to exclude certain subdirectories, especially
# if they contain files that you don't need to search.  OnSearch also 
# searches the subdirectories of each SearchRoot, unless a directory is 
# excluded using the ExcludeDir directive (see below).
#
# You can also have more than one SearchRoot directive.  OnSearch will
# search each of them, unless you also have Volumes defined.  Refer to
# the section on Volumes.
#
# This value is normally set by the OnSearch Installation program.

SearchRoot /path-to-document-directory

# ServerName - The Internet domain name of the Web server.  The value 
# must be identical to the Web server's own "ServerName" parameter in its 
# configuration file, httpd.conf.  The install script normally sets
# this value.  You will need to edit this line yourself if installing 
# manually.
#
# OnSearch still works if you don't (or can't) set this value 
# correctly, but some HTTP features - notably cookies - depend on the 
# server having a fully qualified domain name.  If the Web server is on 
# a local network that doesn't a Berkeley Internet Name Domain server or 
# some other DNS facility, then you'll need to adjust your /etc/hosts 
# files so that the host names syntactically qualify as fully qualified 
# domain names; that is, a host name that you choose, a domain name that 
# you also choose, and a top-level domain (.net, .com, .edu, and so forth).  
# For example, if your Web server is named simply "frodo," then you'll need 
# to adjust the host name (probably by editing /etc/hosts) so that the 
# domain name becomes, for example, "frodo.local.net".  
#
# In this case you'll also need to edit the "ServerName" line in httpd.conf,
# and limit the site's access to the local network by editing the 
# "Allow from ..." parameter(s) in httpd.conf.  Refer to the notes in
# httpd.conf and the Apache documentation.

ServerName your-server-name

# User - This should be user id of the Apache server process; i.e., 
# the value of "User" in httpd.conf.  The installation program 
# normally sets this value.

User the-web-user-id

# WebLogDir - This is the directory where OnSearch keeps its
# Web log.  You should not use a system log directory because 
# OnSearch sets group write permissions on its own log directory.

WebLogDir /usr/local/spool/onsearch

# BinDir - This is the directory where OnSearch will keep its indexing
# program, onindex.  You should NOT change this value unless you must 
# keep the program in a different location.

BinDir /usr/local/sbin

# DataDir - This is where OnSearch stores its run-time information.
# You should NOT change this value unless necessary.

DataDir /usr/local/var/run/onsearch

# ExcludeDir - Directories that contain files you DON'T want to be
# indexed.  The value is the complete pathname of the subdirectory.
# 
# The install script excludes OnSearch's cache and library directories, 
# which are normally $SearchRoot/$OnSearchDir/cache, and 
# $SearchRoot/$OnSearchDir/lib.  You'll need to add the entry if you 
# installed OnSearch manually.

ExcludeDir /directories-to-exclude

# ExcludeGlob - Patterns (wildcards) of file names that you don't 
# want to be indexed or searched.  For example, Java .jar files
# are almost indistinguishable from .zip files, and the zip utility 
# programs don't have the ability to act as filters anyway.  If you 
# have .exe files in your Web directories, you probably don't want 
# to index or search those, either.  Some operating systems 
# treat upper and lower case file names as separate names.  In that 
# case, provide ExcludeGlob entries for both.
#
# Note - Searching and indexing file content other than ASCII text
# (text/plain and text/html files) slows OnSearch considerably.  
# You can add ExcludeGlob patterns for other file types (*.ps, *.PS, 
# *.pdf, *.PDF) here to prevent those file types from being indexed 
# and searched.  If you also want to search these files, comment 
# their ExcludeGlob statements, and also refer to the section on
# Plugins.

ExcludeGlob  *.jar
ExcludeGlob  *.JAR
ExcludeGlob  *.exe
ExcludeGlob  *.EXE
ExcludeGlob  jre*
ExcludeGlob  JRE*
ExcludeGlob  *.o
ExcludeGlob  *.O
ExcludeGlob  *.lo
ExludeGlob   *.LO
ExcludeGlob  *.bin
ExcludeGlob  *.BIN
ExcludeGlob  *.zip
ExcludeGlob  *.ZIP
ExcludeGlob  *.tar.gz
ExcludeGlob  *.dll
ExcludeGlob  *.DLL
ExcludeGlob  *.gif
ExcludeGlob  *.GIF
ExcludeGlob  *.png
ExcludeGlob  *.PNG
ExcludeGlob  *~
ExcludeGlob  *.ps
ExcludeGlob  *.PS
ExcludeGlob  *.pdf
ExludeGlob   *.PDF

# Volume - Allows you to assign a directory or directories to a 
# label.  The format of Volume entries is as in the templates here,
# which define site-wide volumes.  Volumes that users select are 
# saved as part of their preferences.  
#
# If you haven't defined any volumes, or a Web browser doesn't 
# have cookies enabled, OnSearch creates the volume "Default" 
# which is the value of either SearchRoot, above, or the Web 
# server's top-level document directory.
#
# Volume   WebSite    /usr/local/apache2/htdocs

# DigitsOnly - If set to non-zero, also index words that 
# contain only digits.  The -d command line option to onindex 
# overrides this option during indexing.

DigitsOnly 0

# SearchContext - The number of characters before and after the 
# search match to display in the results.

SearchContext 40

# PageSize - The number of results to display per page.

PageSize 5

# ResultsPerFile - The default number of matched words to display 
# for each matching file.  This value can also be set as a user
# preference.

ResultsPerFile 3

# ResultsPersist - How long to keep search results, in seconds.
# 28800 seconds is eight hours.

ResultsPersist 28800

# PartialWordMatch - If set to non-zero, allows partial word matches;
# for example, "computer," also matches, "computers," and, 
# "computerized."  Exact word and phrase searches do not use this 
# option, and it can cause significantly longer search times in
# some cases.

PartialWordMatch 1

# SingleLetterWords - If set to non-zero, words that consist of 
# a single letter, like, "a," "X," ("X Window System"), and, "C,"
# are also considered to be words.  Setting this to zero can
# slightly reduce index size and the time it takes to create the 
# indexes.

SingleLetterWords 1

# BackupIndexes - If set to non-zero, creates backup copies of 
# the previous index(es).

BackupIndexes 1

# IndexInterval - Time in seconds that OnSearch waits between 
# indexing files.  OnSearch normally indexes only files that have 
# changed, but indexing a lot of files for the first time can take 
# an hour or more.  If you have a lot of Postscript and PDF files, 
# indexing time can average 40 seconds or  more per file.  Text and 
# HTML files require much less time.  The best value depends on how 
# many files you are indexing and their type. Indexes should only need 
# updating when the target files change, so the frequency that the files 
# are updated is also significant.

# Wait four hours between indexing.
IndexInterval 14400

# CacheResults - Cache the results of each search.  In normal
# use the value should be non-zero.  You should only need to 
# set the value to zero for testing.

CacheResults 1

# CacheReports - Log information about what the cache is doing.
# You should only need to enable this if you need to monitor 
# cache performance.

CacheReports 0

# VerboseWebIndexer - Set to 1 if you want the Web site indexer
# to report all of its actions when indexing remote Web sites.

VerboseWebIndexer 1

# IndexNontargetURLs - Set to 1 if you want the Web index to
# also index URLs that are on a host different than the host
# you want to index.  WARNING: Use this option with extreme
# caution, or the Web site indexer could end up indexing a 
# large number of other Web sites.

IndexNontargetURLs 0

# PlugIn - Define a plugin filter for non-text files.  Filters
# in the "filters" subdirectory and external filters like 
# pdftotext take their input from STDIN and write to STDOUT.  The 
# first argument to PlugIn is the file's MIME type, and the second 
# is the path name of the filter.  
#
# File types without plugins use the text/plain plugin.

# The format of each line is:
# PlugIn  MIME-type                             plugin-name

# Don't do any filtering on plain text.
PlugIn text/plain                              plugins/text

# A search can seriously bog down if a search term happens
# also to be a HTML tag, so filter them before indexing 
# and searching.  
#
# The html filter relies on the Unicode features built in to
# Perl 5.6.1 and later versions.  For earlier version, change 
# the plugin for these entries to plugins/text.  
#
PlugIn text/html                               plugins/html
PlugIn text/xml                                plugins/html

# Apache includes these message types for mail and news messages.

PlugIn message/rfc822                          plugins/text
PlugIn message/news                            plugins/text

# The Postscript filter uses ghostscript to do the actual translation.

PlugIn application/postscript                  plugins/postscript

# Files that do not contain text can use a null plugin.

PlugIn image/gif                               plugins/null
PlugIn image/png                               plugins/null

# ELF binaries do not have an official IANA type.

PlugIn application/elf                         plugins/null

# Default type for binary files if the server can't determine 
# the file type otherwise.  The plugins/text filter can also
# try to index and search these file types, but the file contents
# might vary widely.

PlugIn application/octet-stream                plugins/null

# The PDF plugin uses pdftotext for translation. 

PlugIn application/pdf                         plugins/pdf

# The first is a MIME type, the second is a MIME encoding. 
# Both of them are used by OnSearch.

PlugIn application/gzip                        plugins/ongzip
PlugIn application/x-gzip                      plugins/ongzip

# The JPEG plugin is written in Perl.

PlugIn image/jpeg                              plugins/jpeg

# Yet another non-IANA designation.

PlugIn application/java-class                  plugins/null

# HasSymLinks - Set to non-zero if your operating system implements
# symbolic file links.  Setting this incorrectly could prevent OnSearch
# from operating.

HasSymLinks 1

