In order to allow a custom format to be defined, two variable's values must be changed:
* C<$custom_format> in F<afeatures.pl> must be set to 1, and * C<$restrict_beneath_document_root> must be set to 0, to allow documents that appear outside the Web server's document root to be indexed.
$custom_formatto 1 notifies Excite for Web Servers that it should deal with all non-HTML files in this collection as custom-format files.
$restrict_beneath_document_root to 0 is necessary as it
relaxes the restriction of Excite for Web Servers that the documents
it serves appear beneath the server's document root.
You should note that there are some drawbacks to this method of serving documents. First, there's some extra computational overhead in invoking CGI scripts. Second, relative-pathname hyperlinks may not work. And third, the loading of images doesn't work, since the text of documents served in this manner by Excite for Web Servers are contained within <PRE> tags.
Below follows an example custom format:
AU Doe, John TI The History of Technology DA July 1st, 1995. AB A short 200-word history of technology. First came fire, then the wheel ... . . ***** AU Doe, Jane TI The History of Mathematics DA July 2nd, 1995. AB A short 200-word history of mathematics. First came one, then two, ... . . *****In the example above, the Document Delimiter would be
'*****'and the Title Delimiter would be
'TI'. Therefore, when the text of each document is retrieved by Excite for Web Servers, there would be two documents in this example, and the titles presented in a result list would be The History of Technology and The History of Mathematics.
As explained above, if you wish to serve the text of these documents using Excite for Web Servers, you must store the custom format files in directories outside of the Web server's document root. Only when documents are stored outside the Web server's document root does Excite for Web Servers know to use CGI scripts to access the text of those documents. This is especially important when a multiple-document-per-file format is being used, since otherwise a link to the file would return the text of many documents at once.
Finally, make sure that the IndexFilter
attribute is set to index text files as well as HTML files. When the
$custom_mode variable is enabled in afeatures.pl, the indexer
assumes that all documents that are not HTML documents are in the