<http://host/dir/search=title>
the server will provide an HTML form (automatically generated or prepared by the maintainer) asking for a regular expression search term. When supplied the server will search the index.cache files in /dir and designated subdirectories for a items whose titles contain a match for the search term. An HTML document with a menu of these items is returned. Subdirectories are designated for recursive searching by an entry in directory record of the index file like
Subdir=dir1,dir2,dir3
You can customize the message offered requesting a search term by creating an HTML form whose ACTION is the URL http://host/dir/search=title and which uses the GET method to return the search term with NAME=query.
Keyword searches
Like title searches except matches are sought in keywords instead
of titles. Keywords for HTML documents are automatically obtained
from headers. For other documents (or HTML documents) they
can be manually supplied in the index file. This is done
by including a line like
Keywords=keyword1, keyword2, etc.
in the relevant document's record in the index file. The URL to use to cause this search to be done is
<http://host/dir/search=keyword>
<http://host/dir/search=title>
Fielded searches for user supplied fields
The maintainer can supply up to 20 additional field values associated
with a document. These are used for searching purposes in the same
way that Keywords are. This is intended to give some additional
"keyword like" fields, for example, document author or document id
number. It works exactly like keywords except these
values are not extracted from HTML files, but must be created with
a line like
Field3=any text here
in the index file. The '3' in this example can be replaced with any single digit. The URL to use as the ACTION in a form or simply to invoke the search in the example above is
<http://host/dir/search=field3>
Like keyword and title searches the search term for a fielded search can be any grep-like regular expression.
Context searches
Unlike the title, keyword, and field searches this is a full text
search of all text/* documents in one directory (not subdirectories).
The returned HTML document contains a list of titles of documents
containing a match each with a sublist of the lines from those
documents containing the match. This provides one line of context for
the match. For HTML documents selecting the matched expression in one
of these takes you to the document with your viewer focused on the
matching location. The primary intent of this feature is to provide
full text searching for an HTML "document" which might consist of a
substantial number of files.
The URL to use as the ACTION in a form or simply to invoke the search is
<http://host/dir/search=context>
It is possible to mark HTML documents with comments so that only part of them is searched. This is done with lines consisting of the comment <!-- #WN_search_off --> which turns off searching until the line consisting of <!-- #WN_search_on --> is encountered.
<http://host/dir/search=grep>
<http://host/dir/foo;search=context>
<http://host/dir/foo;search=grep>
The URL to invoke this search on file foo
<http://host/dir/foo;search=list>
All of the searching methods listed above except the index searches are built into the server and require no additional effort for the maintainer. They are simply referenced with URLs like <http://host/dir/search=context> where /dir is any directory containing files to be served and an index.cache listing them. Of course search permission can be denied for any directory or any file contained in that directory.