Ford & Mason Ltd
HOME
ABOUT
CONTACT
RESOURCES
ADVERTISING



donations support the development of
cronolog.org
and
refcards.com

next up previous contents index
Next: Including HTML within Up: GN cache files Previous: Extended keywords


Search items within menus

Item type 7 indicates a search item within a menu, the particular details of which are specified by the type modifier suffix. When a Gopher client encounters a search item in a menu it requests a search string from the user and passes it with the request to the server. The result of a search is returned as a virtual menu, from which the user can select items. The predefined search types are:

c
menu keyword search (cache search).
g
grep search.
m
structured file.
w
WAIS index search.

A menu keyword search performs a grep-like search for the search string within cache files at or below the point in the data hierarchy specified by the Path field. Items that are invisible, because of attributes or access permissions, are not included. The attribute value nosearch can be used to explicitly exclude an item from searches.

A grep search searches all visible files in the directory specified by the Path field for the search term. This directory must be specified as searchable in the menu file of its parent directory (that is, as type 1s).

The structured file search looks for regular expressions within sections of a structured file, and returns a virtual menu composed of pointers to the sections where a match has been found.

The WAIS index search invokes waisgn, an auxiliary program which performs index searching on the WAIS index file specified in the Path field.

If no suffix is specified, the search is handled by an external program specified by the Path field. The search string is passed to the program as a command line argument, and the program should format its output as a cache file. This format is described in the file docs/technical.notes in the GN distribution.

The grep-like regular expression searching functions (7c, 7g and 7m) do not actually invoke the UNIX grep program - regular expression handling is built into the GN server for performance reasons.


next up previous contents index
Next: Including HTML within Up: GN cache files Previous: Extended keywords

[ITCP]Spinning the Web by Andrew Ford
© 1995 International Thomson Publishing
© 2002 Andrew Ford and Ford & Mason Ltd
Note: this HTML document was generated in December 1994 directly from the LaTeX source files using LaTeX2HTML. It was formatted into our standard page layout using the Template Toolkit. The document is mainly of historical interest as obviously many of the sites mentioned have long since disappeared.

 
Copyright © 1996-2002 Ford & Mason Ltd