[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs

Chapter 21. AIX Documentation Search Service

There are two different sets of "developers" who may need to read this chapter: a) application developers who are including HTML documentation with their application and want to use the Documentation Search Service to provide search functions for their manuals; and b) document authors who want to place a document on a system and allow users to use the Documentation Search Service to search their document.

The Documentation Search Service provides a web server search form that allows users to search HTML online documents. Users can begin searching in two ways. In the CDE Desktop Help subpanel, the global search form can be opened. This search form allows users to search all registered documents that are installed on a system. Alternately, applications can provide search forms that are accessed from their help menus ("Search Help") or from links in their documentation pages, a "Search" link. Typically, these application search forms just search a single document or all the documents for that application.

The Documentation Search Service is an optionally installable component included in the AIX base operating system starting in version 4.3. The service includes a search engine and a CGI layer. The CGI layer is stored in, and run by a web server on a documentation server computer.

When the CGI layer is called by an application, it automatically generates a search form inside the browser, passes the user's search query to the search engine, and displays the search results in results pages. A default generic form is provided. However, using command parameters or a configuration file, you can customize the search form to change things in the form such as the title, text, graphics, and book volumes (indexes) that are searched.

The Documentation Search Service doesn't really search your documents. Instead it searches compressed copies, called indexes, of your documents. This greatly increases performance. So, to use the service, you must create indexes for your documents. When the indexes are copied or installed on a system, the indexes must be registered with the search service so that the service knows their names and locations.

Language Support

Currently, the AIX 4.3 Documentation Search Service can only search documents that meet two criteria. The documents must be written:

  1. in a language that is supported by AIX 4.3, and
  2. using the ISO 8859-1 (Latin-1 Western European) Code Set.

Keep in mind that even if a document is written in one of the supported languages, it cannot be indexed and searched unless it is also written in the ISO 8859-1 Code Set. For information on any changes in language support, make sure to read the README files that come with any updates to the AIX Documentation Search Service.

HTML Document Writing Tips

The first step is to create your HTML documents.

  1. Keep in mind that users may be using an ASCII browser to view your documents. If it is likely that your users will be using an ASCII browser, make your documents ASCII friendly. This includes techniques such as using "ALT" tags for users unable to view images and "NOFRAMES" tags for users with browsers that are not frames capable. Consult an HTML book for other techniques.

  2. Insert a title tag in each document. Make your document titles meaningful and unique. The document title will appear in the list of matched documents in the search results page as the title of the found document. The text between the <TITLE> and </TITLE> tags should contain the title of the document and no other HTML tags. Additionally, titles should have a maximum length of 256 bytes.

  3. Insert into each document the "Search" links that will call the search form. Exactly where you place these search links is up to you. You can place them in the body of your text, in a header at the top of each page, in a navigation frame, or anywhere else where users will be able to see them. See the next section for information on how the search link must be written.

Calling the AIX Documentation Search Service Search Form From Your Documentation

Users can search your documents in two ways.

  1. By default, all registered indexes (compressed copies of document volumes) on a system will appear in the Documentation Search Service global search form. This form is found by clicking on the Documentation Search Service icon in the CDE desktop Help subpanel. When users do a search using this form, all registered indexes on the system are available for search.

  2. Additionally, you can provide "Search" links within your GUI or HTML documents that will launch a search form that only shows and searches your documents. For example, The AIX Hypertext Library includes a "Search" link in the header at the top of each page in their documents. Another example is Web-based System Manager, which includes a search link in it's extended helps document pages. The form that is launched from this link searches only Web-based System Manager help documents.

You call a search form by calling the ds_form CGI program that is installed in the web server cgi-bin directory on the documentation server. If you call this program without specifying any parameters, it will, by default, return the generic global search form which shows all registered indexes on the system.

Normally, instead of the global form, you only want users to search your specific documents. Therefore, you should include in the link command the parameters that tell the search service to create a custom search form that only searches your documents. Additionally, you can also change other elements of the form such as the title and text at the top of the search form, graphics, and almost any other HTML element of a page. You can also change the appearance of the results page.

There are two different ways to specify a custom search form: a) include parameters in the launch link command that list the custom elements of your form; or b) include just the name of a configuration file. The search service will then read the contents of this file to get the custom elements for your search form. The parameter technique is simplest if you just want to use the generic from and specify a few index names. The configuration file technique is better if you want to make a custom form or have a lot of index names to specify.

Note: If you plan on producing translated versions of your search forms and you want a custom title for your search form, we suggest that you use the configuration file method (number 2 below) instead of using a title parameter (method 1 below). The title parameter is part of a call to a CGI program. The CGI standards limit the character codes that can be passed to a CGI program. For title text that is inside a configuration file you can use any character codes that your browser can display. This should make translation of the search form title easier.
  1. The Parameters method for calling a custom search form

    To include parameters in the HTML link, after the URL of the search form CGI add a question-mark (?) followed by an ampersand (&) separated list of parameters and their corresponding values.

    <A href="../../../../../search/index.html">Search</A>

    Example: If you want the generic search form, and you have two indexes called Book1S and Book2S that you want to be searched, you might insert the following link in your HTML document:

    <A href="../../../../../search/index.html">Search</A>

    This will create a link called "Search" in your documents. When this link is clicked, it will open a generic search form with only the two indexes Book1S and Book2S available for searching if they exist.

    Besides the indexes parameter, there are other parameters you can include in the link command to customize your form:

    columns
    Tells the search form CGI how many indexes to display on each line of the search form page. The default value is three.

    Example: If you want the search form to contain four columns of indexes, you might insert the following link in your HTML document:

    <A href="../../../../../search/index.html">Search</A>

    config
    Tells the search form CGI which file to read for configuration information to generate customized search form and search results pages. See the following section for information on the contents of the configuration file.

    Example: If you want the search form to be configured based on the config information in /mypath/myconfig.cfg where /mypath/myconfig is a file on the documentation server machine, you might insert the following link in your HTML document:

    <A href="../../../../../search/index.html">Search</A>

    indexes
    Instructs the search form CGI which indexes to display for selection.

    When you give a list of indexes to display the search form will contain only those indexes that are in the list and can be found on that documentation server. Any index specified that is not found on the documentation server will not be displayed.

    If you want the search form to display an index you specified even when it is not found or is in error, put a plus (+) in front of the index name in the HTML link.

    Example: If you want the search form to display the indexes Book1S and Book2S regardless of whether or not they can be found on the documentation server, you might insert the following link in your HTML document:

    <A href="../../../../../search/index.html">Search</A>

    If you want the search form to prevent a specific index from being displayed and selectable for searching, you can put a minus (-) in front of the index name in the HTML link.

    Example: If you want the search form to display all of the indexes except the indexes Book1S and Book2S, you might insert the following link in your HTML document:

    <A href="../../../../../search/index.html">Search</A>

    lang
    Instructs the search form CGI in which language to display the search form. See "Locale Overview" in AIX Version 4.3 System Management Guide: Operating System and Devices for more information on possible values for the lang parameter.

    Example: If you want the search form to be displayed in Spanish, you might insert the following link in your HTML document:

    <A href="../../../../../search/index.html">Search</A>

    Of course, you would probably replace the word "Search" with the translated version.

    results_title
    Instructs the search form CGI what to display as the title of the search results page.

    Example: If you want the title of the results page to be "Results of My Search", you might insert the following link in your HTML document:

    <A href="../../../../../search/index.html">Search</A>

    Note: All spaces in the title must be replaced with pluses (+).

    title
    Instructs the search form CGI what to display as the title of the search form page.

    Example: If you want the title of the search form to be "Searching My Documents", you might insert the following link in your HTML document:

    <A href="../../../../../search/index.html">Search</A>

    Note: All spaces in the title must be replaced with pluses (+).

  2. The configuration file method for calling a custom search form

    This is the recommended method if you want a custom search form or have more than a few indexes you want to search.

    Note: With the exception of the indexes configuration file entry, a parameter will supersede any configuration file entry of the same name.

    1. Create a configuration file that contains the custom elements for our search form. If the Documentation Search Service is installed on your computer, a sample configuration file can be found in /usr/docsearch/sample.cfg.

      There are two formats for configurations that can be set in a configuration file:

      1. Configuration file entries of the type: parameter=value


        columns
        Tells the search form CGI how many indexes to display on each line of the search form page. The default value is three.

        Example: If you want the search form to contain four columns of indexes, you might insert the following in your configuration file:

        columns=4

        If a columns parameter is also specified in the HTML link, the parameter will supersede the columns configuration file entry.


        indexes
        Instructs the search form CGI which indexes to display for selection.

        When you give a list of indexes to display the search form will contain only those indexes that are in the list and can be found on that documentation server. Any index specified that is not found on the documentation server will not be displayed.

        Example: If you want the search form to display only the indexes Book1S and Book2S, you might insert the following in your configuration file:

        indexes=Book1S,Book2S

        If you want the search form to display an index you specified even when it is not found or is in error, put a plus (+) in front of the index name in the configuration file.

        Example: If you want the search form to display the indexes Book1S and Book2S regardless of whether or not they can be found on the documentation server, you might insert the following in your configuration file:

        indexes=+Book1S,+Book2S

        If you want the search form to prevent a specific index from being displayed and selectable for searching, you can put a minus (-) in front of the index name in the configuration file.

        Example: If you want the search form to display all of the indexes except the indexes Book1S and Book2S, you might insert the following in your configuration file:

        indexes=-Book1S,-Book2S

        The data from an indexes parameter specified in the HTML link is cumulative with the data in the indexes configuration file entry.

        Example #1: If the HTML link is:

        <Ahref="../../../../../search/index.html">Search</A>

        and the configuration file /tmp/config.cfg contains the line:

        indexes=Book3S,Book4S

        The search form will display Book1S, Book2S, Book3S and Book4S.

        The data from an indexes parameter specified in the HTML link will override the data in the indexes configuration file entry.

        Example #2: If the HTML link is:

        <Ahref="../../../../../search/index.html">Search</A>

        and the configuration file contains the line:

        indexes=-Book2S

        The search form will display both Book1S and Book2S.


        lang
        Instructs the search form CGI in which language to display the search form. See "Locale Overview" in AIX Version 4.3 System Management Guide: Operating System and Devices for more information on possible values for the lang parameter.

        Example: If you want the search form to be displayed in Spanish, you might insert the following in your configuration file:

        lang=es_ES

        If a lang parameter is also specified in the HTML link, the parameter will supersede the lang configuration file entry.


        results_title
        Instructs the search form CGI what to display as the title of the search results page.

        Example: If you want the title of the results page to be "Results of My Search", you might insert the following in your configuration file:

        results_title=Results of My Search

        If a results_title parameter is also specified in the HTML link, the parameter will supersede the results_title configuration file entry.

        Note: The results title parameter will be ignored if a results_top configuration file entry is given.


        search_page
        Redirects the web browser to another URL without changing the HTML link in the document.

        Example: If you had a configuration file for users wanting to search your documentation, but now want them to search the documentation at some remote site instead, you might change the contents of your configuration file to:

        search_page=http://my.other.site/mypath/mypage.html

        Note: Specifying a search_page configuration will cause all other settings to be ignored.


        title
        Instructs the search form CGI what to display as the title of the search form page.

        Example: If you want the title of the search form to be "Searching My Documents", you might insert the following in your configuration file:

        title=Searching My Documents

        If a title parameter is also specified in the HTML link, the parameter will supersede any title configuration file entry.

        Note: The title configuration will be ignored if the search_top configuration is given.



      2. Configurations of the type: configuration_begin
        <your HTML code>
        parameter_end

        Notice that all of these configurations have _begin appended to their name to indicate the start of the HTML code fragment, and _end appended to their name to indicate the end of the HTML code fragment.

        search_top
        Replaces the default HTML header of the search form page with the HTML code between the search_top_begin and search_top_end tags.

        Example: If you want the top of your search form page to contain an image named myimage.gif which is in the web server's /images directory, and the title of your search form page to be "Search My Documents", you might insert the following in your configuration file:

        Cound not get ride of SRC for /images/myimage.gif in
        search_top_begin
        <HTML>
        <HEAD>
        <TITLE>Search My Documents</TITLE>
        <BODY>
        <CENTER><IMG SRC="/images/myimage.gif"></CENTER>
        <P>
        search_top_end
        search_top_begin
        <HTML>
        <HEAD>
        <TITLE>Search My Documents</TITLE>
        <BODY>
        <CENTER><IMG SRC="/images/myimage.gif"></CENTER>
        <P>
        search_top_end

        Note: Any title parameter or title configuration file entry specified will be ignored.

        search_bottom
        Replaces the default HTML footer of the search form page with the HTML code between the search_bottom_begin and search_bottom_end tags.

        Example: If you want the bottom of the search form page to have a MAILTO link so that users can send mail to you, you might insert the following in your configuration file:

        search_bottom_begin
        <HR><P>
        <CENTER><A HREF="MAILTO:me@my.site"></CENTER>
        </BODY>
        </HTML>
        search_bottom_end

        results_top
        Replaces the default HTML header of the results page with the HTML code between the results_top_begin and results_top_end tags.

        Example: If you want the top of your results page to contain an image named myimage.gif which is in the web server's images directory, and the title of your results page to be "Results of My Search", you might insert the following in your configuration file:

        Cound not get ride of SRC for /images/myimage.gif in
        results_top_begin
        <HTML>
        <HEAD>
        <TITLE>Results of My Search</CENTER>
        <BODY>
        <CENTER><IMG SRC="/images/myimage.gif"></CENTER>
        <P>
        results_top_end
        results_top_begin
        <HTML>
        <HEAD>
        <TITLE>Results of My Search</CENTER>
        <BODY>
        <CENTER><IMG SRC="/images/myimage.gif"></CENTER>
        <P>
        results_top_end

        Note: Any title parameter or title configuration file entry specified will be ignored.

        results_bottom
        Replaces the default HTML footer of the results page with the HTML code between the results_bottom_begin and results_bottom_end tags.

        Example: If you want the bottom of the results page to have a MAILTO link so that users can send mail to you, you might insert the following in your configuration file:

        results_bottom_begin
        <HR><P>
        <CENTER><A HREF="MAILTO:me@my.site"></CENTER>
        </BODY>
        </HTML>
        results_bottom_end


      3. Insert into your documents the Search links that specify a configuration file to generate your custom search form. See the previous section for information on specifying a configuration file in an HTML link.

Creating Indexes of your Documentation

The search engine does not search your actual documentation files. Instead it searches indexes that are created from your documentation. Very simplistically, indexes are compressed copies of your files. This greatly speeds up the searches. Therefore, if you want to use the search service to search your documents, you must create at least one index that will be installed with your documents.

To Create Indexes:

  1. If it isn't already installed, install the Documentation Search Service package onto your development computer. For more information on installation and configuration, see "Documentation Search Services" in AIX Version 4.3 System Management Guide: Operating System and Devices.

  2. If it is not already installed, install the search engine authoring tools package - IMNSearch Build Time package (IMNSearch.bld) on your computer. This software is contained on the AIX Base Operating System media.

  3. To use the index creation tool, you must be a member of the imnadm index administrators user group. If your username is not a member of this group, have your system administrator add you user ID to this group. Or log in using another username that is a member of this group.

  4. Build the index(es).

    Each index you create will have its own selection checkbox in the search form. You can create one index for each of your documents. Or you can create one index that combines text from multiple documents. But keep in mind that each time that index is selected for search, all the documents in that index will be searched. So when you combine documents into an index, you should think about what documents your user will want to search together.

    Also, if you are creating an installp package, all documents that are within one index should be placed inside the same installable unit (fileset) of documentation. Otherwise users might only install some of the documents within the index and they would get "missing document" errors when they try to open the documents from the search results page.

    For each index you want to create, repeat the following steps

    1. Create a new directory to hold the documents that will go into the index. We will call this directory the "build" directory. Within this build directory, create a directory named for the language the documents are written in. You must use the standard locale name for each language. For example, English is "en_US" (see "Locale Overview" in AIX Version 4.3 System Management Guide: Operating System and Devices for the correct language names). Inside the language directory create a directory named with your application's name. Inside this application directory, arrange the documents into a directory tree structure exactly as you want them to be installed/placed relative to each other on a documentation search server computer.

      The result is that each document will have a full pathname that is composed of a "temporary" part, and a "permanent" part. The temporary part is the pathname of the build directory. The permanent part of the path specifies the location of the document inside your document tree. Once an index is built, the permanent part of a document's pathname cannot be changed. The two rules about the pathnames is that the first directory in the permanent part of the pathname must be named the name of the language the documents are written in and the second directory must be your application's name.

      For example, your application is called "calculator". The online documents for the application are written in English. There are two user guide documents (doc1, doc2) and one administrator document (doc3). You could place the documents like this in the filesystem on the computer on which you are building the indexes:

      /usr/share/man/info/en_US/calculator/user/doc1.html
      /usr/share/man/info/en_US/calculator/user/doc2.html
      /usr/share/man/info/en_US/calculator/admin/doc3.html

      You can arrange your documents anywhere and in any way you like, except that all documents that go into a single index must share a common top directory so that they form a single tree. In the example, "calculator" is the common top directory. Your documentation can be in any directory when you are indexing them.

    2. For each index, create an ASCII file that contains just the current full pathnames of all documents that will be part of the index. Put each pathname on its own line in the file.

      If you arranged your documents like the example above, your ASCII file would have the following contents:

      /usr/share/man/info/en_US/calculator/user/doc1.html
      /usr/share/man/info/en_US/calculator/user/doc2.html
      /usr/share/man/info/en_US/calculator/admin/doc3.html

      Next you must indicate where the temporary part of each pathname ends and where the permanent "installed" part of the pathnames start. You do this by replacing the last slash "/" in the temporary part of the document pathnames with an ampersand "@". When the index is created, only the part of each pathname that is to the right of the @ will be saved in the index definition file.

      For example, the above example file would now be modified to look like this:

      /usr/share/man/info/en_US@calculator/user/doc1.html
      /usr/share/man/info/en_US@calculator/user/doc2.html
      /usr/share/man/info/en_US@calculator/admin/doc3.html

      The slash after the "en_US" was replaced with a @ since it is the last slash in the temporary part of the path.

      Every web server has an internal home directory where it starts its search for documents that requested by. When the Documentation Search Server is installed and configured, a filesystem link is placed in this directory. This link points to the standard location of documents in the AIX filesystem: /usr/share/man/info. Since your web server's will automatically go to this location to find your documents, the search engine only needs the portion of the document path from this location forward.

      With a link in your web server's starting directory like
      doc_link -> /usr/share/man/info

      Your web server will be able to serve the documentation with URLs like
      http://your.machine.name/doc_link/en_US/calculator/user/doc1.html

    3. Choose a unique index name.

      Index Naming Conventions

      When you create a search index for a document you must specify an eight (8) character name for the index. However, the search service will not let you register your new index if there is already a registered index that has the same name as your index. To reduce the probability of naming conficts, it is recommended that certian naming conventions be followed:

      1. If you are not an application developer and are just creating indexes for documents written at your site, use 999 as the first three characters of all your index names. The middle three characters of the name can be any combination of letters and numbers. The last two characters should specify the language abbreviation of the document.

        For example, if you are creating an index for a document you wrote in English, you might name it 999ak2en .

      2. If you are an application developer and you are creating indexes to package in your installp package, all of your index names should start with three characters that represent your application's name. The middle three characters of the name can be any combination of letters and numbers. The last two characters should specify the language abbreviation of the document.

        For example, if your application is called Calculator, and the document you are indexing is written in Spanish, you could name the index cal2b4es .

      Note: If your documents are written in English the index name should end in en .
    4. Choose a title for your index.

      The title of your index is the text that will appear next to the index's checkbox in the search form. The title should uniquely describe the document or documents that are in the index and contain a maximum of 256 characters.

    5. Next, you must create an empty index. After the index is created you will fill it. Note: Remember that your user id must be a member of the imnadm group to use these commands.

      Note: The imnixcrt command will attempt to create the data and work directories and any missing higher directories. However, the directory structure must be writable by the user 'imnadm' for the imnixcrt command to create the directories.

      Before you can create your first index you will need to make the /usr/docsearch directory writable by the user 'imnadm'. You will only need to do this step before you create your first index.

      chown imnadm:imnadm /usr/docsearch

      The index creation command has the syntax (all on one line):

      /usr/IMNSearch/cli/imnixcrt <index name> /usr/docsearch/indexes/<index name>/data /usr/docsearch/indexes/<index name>/work WT

      where <index name> is the 8 character name of the index and the last argument is WT.

      Following our example, you could type (all on one line)

      /usr/IMNSearch/cli/imnixcrt cal413es /usr/docsearch/indexes/cal413es/data /usr/docsearch/indexes/cal413es/work WT

    6. Add the documents to the index's list of documents that will be added the next time the index is updated.

      /usr/IMNSearch/cli/imndoadd <index name> <document list file>

    7. Start the index updating process to build your index.

      /usr/IMNSearch/cli/imnixupd <index name>

    8. Update the registration table. If you are just creating an index for use on this single computer, the next step is to update the search service index registration table. If you are developing an application package, you should also do this so that you can test your search index on this machine before putting it into your installation package.

      To update the registration table on the development computer:

      /usr/IMNSearch/cli/imndomap /var/docsearch/indexes -c <indexname> /doc_link/en_US/ "<index title>"

      Where <indexname> is the name of your index, and <index title> is the title of your index (the text you want the user to see when they are selecting which indexes to search).

      Then copy the new index registration table over the backup copy of the index registration table by typing:

      cp /var/docsearch/indexes/imnmap.dat /usr/docsearch/indexes

    9. If you are just creating an index for running on this one computer, your task is completed. To test the index, you can try searching the index using the search form launched by clicking on the Documentation Search Service icon in the desktop help subpanel, or, if you created any 'Search' links, you can click on one of them in your document.

      If you are creating an index to put in an application's AIX installp package, continue to "Packaging your application's index(es) with your application's documentation".


The index build tool assumes all documents are in the codeset ISO 8859-1. If your documents are not in this codeset when you build your indexes, searches on those indexes may generate unexpected results.

If you are building indexes of documents written in a language other than English, you should replace references to the locale 'en_US' with the locale that corresponds to the language in which your documents are written. See "Locale Overview" in AIX Version 4.3 System Management Guide: Operating System and Devices for more information on possible locales.

To Remove an Index:

  1. Delete the index

    /usr/IMNSearch/cli/imnixdel <index name>

  2. Remove the index's entry in the registration table.

    /usr/IMNSearch/cli/imndomap /var/docsearch/indexes -d <index name>

  3. Copy the changed index registration table over the backup copy of the index registration table by typing:

    cp /var/docsearch/indexes/imnmap.dat /usr/docsearch/indexes

  4. Then delete the leftover index directories:

    rm -r /usr/docsearch/indexes/<index name>

Packaging your application's index(es) with your application's documentation

To include the search index in your application's AIX installp installation package, you will need to complete the following steps:

Note: You must repeat these steps for each separately installable fileset in your package that contains one or more indexes.

  1. First, you must create a registration script that will register your indexes with the Documentation Search Service during the install process.

    1. Make a copy of the script in /usr/docsearch/tools/index_config.sh

    2. Edit the script and change:

      1. indexdir_name_X to the name of your index (repeat for each index).

      2. index_title_X to the title of your index.

      3. index_loc_X to the location where installp will be placing your index when your application is installed in AIX. You can install your indexes anywhere, but the recommended location is /usr/docsearch/indexes .

      4. document_loc_X to the temporary portion of the document path. This path segment must begin and end with a slash (/).

      Example: To install the indexes Book1S and Book2S which are being installed in /usr/docsearch/indexes/Book1S and /usr/docsearch/indexes/Book2S , have the titles Book #1 and Book #2 , and whose documents are in /usr/share/man/info/en_US/calendar/... you might have lines in the script like:
      indexdir_name_1="Book1S"
      indexdir_name_2="Book2S"
      
      index_title_1="Book #1"
      index_title_2="Book #2"
      
      index_loc_1="/usr/docsearch/indexes/Book1S"
      index_loc_2="/usr/docsearch/indexes/Book2S"
      
      document_loc_1="/doc_link/en_US/"
      document_loc_2="/doc_link/en_US/"
    3. Delete all other index XXX variable assignments from the script. There should only be as many lines of the form indexdir_name_X="..." as there are indexes you want to install. The same holds true for index_title_X, index_loc_X, and document_loc_X.

  2. Next, create the uninstall script that will cleanly unregister your index if your application is uninstalled.

    1. Make a copy of the unconfig script in /usr/docsearch/tools/index_unconfig.sh

    2. Edit the script and change indexdir_name_X to the name of your index (repeat for each index).

    3. Delete all other indexdir_name_X variable assignments from the script. There should only be as many lines of the form indexdir_name_X="..." as there are indexes you want to uninstall.

  3. Create the pre_rm script that will cleanly unregister your index when your application is reinstalled using a force install or updated in preparation for installing new versions of your index.

    1. Make a copy of the pre_rm script that is in /usr/docsearch/tools/index_pre_rm.sh

    2. Edit your copy of the script and change indexdir_name_X to the name of your index (repeat for each index).
      Example: If you have two indexes with the names cal2b4es and cal3c5es your copy of the pre_rm script would have lines like:
      indexdir_name_1="cal2b4es"
      indexdir_name_2="cal3c5es"
    3. Delete all other indexdir_name_X variable assignments from the script. There should only be as many lines of the form indexdir_name_X="..." as there are indexes in your fileset.

  4. Create a normal AIX install package for your documentation or application. If you need instructions on how to create an AIX install package, see "Packaging Software for Installation" .

    1. Place the install script in your installp package so that it will be run in your post-install process when the fileset containing the index is installed.

    2. Place the uninstall script in your installp package so that it will be run in your uninstall process when the fileset containing the index is uninstalled.

[ Previous | Next | Contents | Glossary | Home | Search ]