CL Command Reference - CFGHTTPSCH

CL Command List > CFGHTTPSCH Reference

Description:

The Configure Search (CFGHTTPSCH) command allows you to do various search administration tasks that include working with an index, a document list, a URL mapping rules file, or a thesaurus, plus building objects used for web crawling.

You can create an index, add documents to an index, remove documents from an index, delete an index, create, update, or delete a document list, create or update a mapping rules file.

To create an index, add or remove documents from an index, you will need to provide a document list. Specify *CRTDOCL for the Option (OPTION) parameter to create a document list.

To create an index, specify *CRTIDX for the OPTION parameter.

To create a document list, specify *CRTDOCL for the OPTION parameter. The document list can be used when you create (*CRTIDX) or update (*ADDDOC or *RMVDOC) an index.

To append additional document paths to a document list, specify *UPDDOCL for the OPTION parameter. The document list can be used when you create (*CRTIDX) or update (*ADDDOC or *RMVDOC) an index.

To add documents to an index, specify *ADDDOC for the OPTION parameter. All new or changed documents in the document list will be added to the index.

To remove documents from the index, specify *RMVDOC for the OPTION parameter.

To delete a document list, specify *DLTDOCL for the OPTION parameter.

To delete an index, specify *DLTIDX for the OPTION parameter.

To create a mapping rules file, specify *CRTMAPF for the OPTION parameter.

To add additional configuration directives to a mapping rules file, specify *UPDMAPF for the OPTION parameter.

To create a thesaurus dictionary that can be used on a search, specify *CRTTHSDCT for the OPTION parameter.

To retrieve a thesaurus definition file from a thesaurus dictionary, specify *RTVTHSDFNF for the OPTION parameter

The next set of OPTIONS are used for working with objects that are used when crawling remote web sites.

To create a URL object that contains a list of URLs to crawl, specify *CRTURLOBJ for the OPTION parameter.

To update a URL object, specify *UPDURLOBJ for the OPTION parameter.

To delete a URL object, specify *DLTURLOBJ for the OPTION parameter.

To create an options object, specify *CRTOPTOBJ for the OPTION parameter.

To update an options object, specify *UPDOPTOBJ for the OPTION parameter.

To delete an options object, specify *DLTOPTOBJ for the OPTION parameter.

To print the status of an index, specify *PRTIDXSTS for the OPTION parameter.

To print the status of a document list, specify *PRTDOCLSTS for the OPTION parameter.

Restrictions

. You must have input/output system configuration (*IOSYSCFG) special authority to use this command.


Examples:

Example 1: Create a Document List

CFGHTTPSCH OPTION(*CRTDOCL)
DOCLIST(¡¯/QIBM/USERDATA/HTTPSVR/INDEX/myindex.DOCUMENT.LIST¡¯)
STRDIR(¡¯/QIBM/ProdData/HTTP/Public/HTTPSVR/HTML¡¯)

This example will create a document list called /QIBM/USERDATA/HTTPSVR/INDEX/myindex.DOCUMENT.LIST from the directory /QIBM/ProdData/HTTP/Public/HTTPSVR/HTML using the defaults SUBTREE(*ALL) PATTERN(¡¯*.HTM*¡¯). The subdirectories will be searched and only files containing the pattern *.HTM will be included in the list.



Example 2: Create an Index

CFGHTTPSCH OPTION(*CRTIDX) IDX(myindex)
DOCLIST(¡¯/QIBM/USERDATA/HTTPSVR/INDEX/myindex.DOCUMENT.LIST¡¯)
IDXHTML(*ABSTRACT)

This example will create an index called myindex in index directory /QIBM/USERDATA/HTTPSVR/INDEX. The document list is in the file /QIBM/USERDATA/HTTPSVR/INDEX/myindex.DOCUMENT.LIST.

In this example the following is defined:
. The documents are HTML documents by default.
. Any file errors found for a document are ignored.
. Searches can be case-sensitive.
. Alphanumeric characters are valid search characters.
. The META tag with ¡åAbstract¡å will be indexed separately.
. The character string following the META tag will also be included when the document is indexed.
. Searches are enabled for the entire document and the META tag field.



Example 3: Create a Mapping Rules File

CFGHTTPSCH OPTION(*CRTMAPF) CFG(¡¯MYCFG¡¯)
URLPFX(¡¯http://www.myserver.com¡¯)
MAPFILE(/QIBM/USERDATA/HTTPSVR/INDEX/myindex.MAP_FILE)

This example will create a mapping file called ¡¯/QIBM/USERDATA/HTTPSVR/INDEX/myindex.MAP_FILE¡¯. The URL prefix ¡¯http://www.myserver.com¡¯ plus all of the Pass directives from the MYCFG configuration will be copied to the mapping rules file. When documents are found on a search, the URLPFX will be followed by the path determined from the actual file path and the Pass directive.

If a document is physically located at /root/clothing/doc1.htm, and there is a Pass /clothing/* /root/clothing/* directive in the configuration file, the URL for the document on the search results will be http://www.myserver.com/clothing/doc1.htm .