Manage search indexes for the Webserver search engine on HTTP Server

This topic provides information about how to manage your search indexes with the IBM® Web Administration for i5/OS™ interface.

Important: Information for this topic supports the latest PTF levels for HTTP Server for i5/OS . It is recommended that you install the latest PTFs to upgrade to the latest level of the HTTP Server for i5/OS. Some of the topics documented here are not available prior to this update. See http://www.ibm.com/servers/eserver/iseries/software/http/services/service.htm Link outside Information Center for more information.

This topic explains how to manage search indexes for the Webserver search engine on HTTP Server. Set up the Webserver search engine on HTTP Server (powered by Apache) to learn how to create a search index.

The following topics explain how to manage your search index.

Update search index

After creating a search index, you will want to update it when ever you change the documents being searched. For example, if you add additional content to some of your files, that content will not be found in using the Webserver search engine until you update your search index. You can add new or changed documents or delete documents from the index. If documents are added, they will be indexed and added to the supplemental index. Use the fields to specify information about the documents to add to the index. Once you have finished adding the documents, you may want to merge the supplemental and main indexes.

To update your search index, do the following:

  1. Click the Advanced tab.
  2. Click the Search Setup subtab.
  3. Expand Search Engine Setup.
  4. Select your search index from the Index list.
  5. Click Update search index.
  6. Choose one of the following:
    Build a document list from this directory
    Select this option to create a document list containing the set of documents to add, update, or delete from your search index.
    There are two additional options that you may select.
    Traverse subdirectories in this directory
    Select to include any documents in subdirectories of the directory you provided in the field above.
    Document filter
    Select this option if you want the document list to be made of specific file types. For example, entering *.htm* will only build a document list of file types htm and html.
    Use the document list in this file
    Select this option if you want to use an existing document list to add, update, or delete document from your search index.
  7. Choose an updating processing option:
    Add new or changed documents to the index
    Select this option to use the document list to add or update document in your search index.
    Delete documents from the index
    Select this option to use the document list to delete documents from your search index.
  8. Choose a document content option:
    Documents are HTML documents
    Select this option if the documents to be searched are HTML.
    Documents are TEXT documents
    Select this option if the documents to be searched are text documents (do not contain HTML tags).
  9. Choose a processing option:
    Update index immediately
    Select this option if you want the search index to be updated as soon as you complete the form.
    Update index in a background task
    Select this option if you want the search index to be updated in a background task. This is the suggested method if there is a large number of documents to be indexed.
  10. Choose a document error processing option:
    Skip documents in error
    Select this option if you want the search index to continue updating if document errors are found. The documents found with an error will not be included in the search index.
    Stop processing when error occurs
    Select this option if you want the search index to stop updating if document errors are found. All documents before the error will be indexed.
  11. Click Apply.

To update the search index using the CFGHTTPSCH *ADDDOC and CFGHTTPSCH *MGRIDX CL commands, do the following:

CFGHTTPSCH OPTION(*ADDDOC) IDX(myindex) IDXDIR('/mydir') +
DOCLIST('/mydir/myindex.DOCUMENT_LIST')
CFGHTTPSCH OPTION(*MRGIDX) IDX(myindex) IDXDIR('/mydir')

You can also update your index through scheduled batch jobs. For example, to update an index on Friday of every week at 11:30 p.m., do the following:

ADDJOBSCDE JOB(UPDATE) CMD( CFGHTTPSCH OPTION(*ADDDOC) IDX('myindex')
   DOCLIST('/QIBM/UserData/HTTPSVR/index/myindex.DOCUMENT.LIST')) 
   JOB(UPDATE) 
   FRQ(*WEEKLY) 
   SCDDATE(*NONE) 
   SCDDAY(*FRI) 
   SCDTIME('23:30:00')

To update an index at 11:30 p.m. on the last day of every month, do the following:.

ADDJOBSCDE JOB(UPDATE) CMD(CFGHTTPSCH OPTION(*ADDDOC) IDX('myindex')
   DOCLIST('/QIBM/UserData/HTTPSVR/index/myindex.DOCUMENT.LIST') ) 
   JOB(UPDATE) 
   SCDDATE(*MONTHEND) 
   SCDTIME('23:30:00') 
   FRQ(*MONTHLY)

Merge search index

The supplemental index contains indexed documents that were added with the update search index form and are not yet merged into the main index. This merged index will include both the supplemental index and the main index.

To merge your search indexes, do the following:

  1. Click the Advanced tab.
  2. Click the Search Setup subtab.
  3. Expand Search Engine Setup.
  4. Select your supplemental search index from the Index list.
  5. Click Merge search index.
  6. Choose one of the two processing options:
    Merge index immediately
    Select this option if you want the search indexes to merge as soon as you complete the form.
    Merge index in a background task
    Select this option if you wan the search indexes to merge in a background task. This is the suggested method if the search indexes are large.
  7. Click Apply.

Delete search index

You can delete both the main and supplemental indexes or just the supplemental index. The supplemental index contains indexed documents that were added with the update search index form and are not yet merged into the main index.

To delete your search indexes, do the following:

  1. Click the Advanced tab.
  2. Click the Search Setup subtab.
  3. Expand Search Engine Setup.
  4. Select your search index from the Index list.
  5. Click Delete search index.
  6. Choose one of the two processing options:
    Delete both main and supplemental indexes
    Select this option if you want to delete both the supplemental and main search indexes from your iSeries™.
    Delete only the supplemental index
    Select this option if you want to delete the supplemental search index from your iSeries. Your main search index will not be deleted.
  7. Click Delete.

View the status of search index

The Webserver search engine can show the status of a search index allowing you to keep track of its progress when updating or merging.

To view the status of a search index, do the following:

  1. Click the Advanced tab.
  2. Click the Search Setup subtab.
  3. Expand Search Engine Setup.
  4. Select your search index from the Index list.
  5. Click View status of search index.

The status page displays all the current information available for the search index. Use this page to see any file errors that occurred during indexing.